mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Remove some old code
This commit is contained in:
parent
18370f39b8
commit
992c113f09
3 changed files with 1 additions and 36 deletions
|
@ -107,7 +107,7 @@ impl<R: Read> self::Bytes::Select for ByteReader<R> {
|
|||
Comp,
|
||||
Part,
|
||||
Newl,
|
||||
};
|
||||
}
|
||||
|
||||
use self::Bytes::Selected::*;
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ fn test_file_and_links_strip() {
|
|||
fn test_file_and_links_strip_zero() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
let result = scene.ucmd().run();
|
||||
|
||||
at.touch("foo");
|
||||
at.symlink_file("foo", "bar");
|
||||
|
|
|
@ -137,12 +137,6 @@ impl CmdResult {
|
|||
Box::new(self)
|
||||
}
|
||||
|
||||
/// like stderr_is(...), but expects the contents of the file at the provided relative path
|
||||
pub fn stderr_is_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T) -> Box<&CmdResult> {
|
||||
let contents = read_scenario_fixture(&self.tmpd, file_rel_path);
|
||||
self.stderr_is(contents)
|
||||
}
|
||||
|
||||
/// asserts that
|
||||
/// 1. the command resulted in stdout stream output that equals the
|
||||
/// passed in value, when both are trimmed of trailing whitespace
|
||||
|
@ -165,12 +159,6 @@ impl CmdResult {
|
|||
self.no_stdout().stderr_is(msg)
|
||||
}
|
||||
|
||||
/// like stderr_only(...), but expects the contents of the file at the provided relative path
|
||||
pub fn stderr_only_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T) -> Box<&CmdResult> {
|
||||
let contents = read_scenario_fixture(&self.tmpd, file_rel_path);
|
||||
self.stderr_only(contents)
|
||||
}
|
||||
|
||||
pub fn fails_silently(&self) -> Box<&CmdResult> {
|
||||
assert!(!self.success);
|
||||
assert_eq!(self.stderr, "");
|
||||
|
@ -360,22 +348,6 @@ impl AtPath {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn cleanup(&self, path: &'static str) {
|
||||
let p = &self.plus(path);
|
||||
if let Ok(m) = fs::metadata(p) {
|
||||
if m.is_file() {
|
||||
fs::remove_file(&p).unwrap();
|
||||
} else {
|
||||
fs::remove_dir(&p).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn root_dir(&self) -> String {
|
||||
log_info("current_directory", "");
|
||||
self.subdir.to_str().unwrap().to_owned()
|
||||
}
|
||||
|
||||
pub fn root_dir_resolved(&self) -> String {
|
||||
log_info("current_directory_resolved", "");
|
||||
let s = self
|
||||
|
@ -525,12 +497,6 @@ impl UCommand {
|
|||
Box::new(self)
|
||||
}
|
||||
|
||||
/// like arg(...), but uses the contents of the file at the provided relative path as the argument
|
||||
pub fn arg_fixture<S: AsRef<OsStr>>(&mut self, file_rel_path: S) -> Box<&mut UCommand> {
|
||||
let contents = read_scenario_fixture(&self.tmpd, file_rel_path);
|
||||
self.arg(contents)
|
||||
}
|
||||
|
||||
pub fn args<S: AsRef<OsStr>>(&mut self, args: &[S]) -> Box<&mut UCommand> {
|
||||
if self.has_run {
|
||||
panic!(MULTIPLE_STDIN_MEANINGLESS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue