mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests ~ fix tests for new execution_phrase!()
and usage phrasing
This commit is contained in:
parent
c0854000d1
commit
4da46d93c7
11 changed files with 96 additions and 48 deletions
|
@ -15,11 +15,15 @@ fn test_more_dir_arg() {
|
|||
// Maybe we could capture the error, i.e. "Device not found" in that case
|
||||
// but I am leaving this for later
|
||||
if atty::is(atty::Stream::Stdout) {
|
||||
let result = new_ucmd!().arg(".").run();
|
||||
let ts = TestScenario::new(util_name!());
|
||||
let result = ts.ucmd().arg(".").run();
|
||||
result.failure();
|
||||
const EXPECTED_ERROR_MESSAGE: &str =
|
||||
"more: '.' is a directory.\nTry 'more --help' for more information.";
|
||||
assert_eq!(result.stderr_str().trim(), EXPECTED_ERROR_MESSAGE);
|
||||
let expected_error_message = &format!(
|
||||
"{0}: '.' is a directory.\nTry `{1} {0} --help` for more information.",
|
||||
ts.util_name,
|
||||
ts.bin_path.to_string_lossy()
|
||||
);
|
||||
assert_eq!(result.stderr_str().trim(), expected_error_message);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue