mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27: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
|
@ -114,9 +114,12 @@ fn test_no_args() {
|
|||
|
||||
#[test]
|
||||
fn test_no_args_output() {
|
||||
new_ucmd!()
|
||||
.fails()
|
||||
.stderr_is("basename: missing operand\nTry 'basename --help' for more information.");
|
||||
let ts = TestScenario::new(util_name!());
|
||||
ts.ucmd().fails().stderr_is(&format!(
|
||||
"{0}: missing operand\nTry `{1} {0} --help` for more information.",
|
||||
ts.util_name,
|
||||
ts.bin_path.to_string_lossy()
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -126,10 +129,12 @@ fn test_too_many_args() {
|
|||
|
||||
#[test]
|
||||
fn test_too_many_args_output() {
|
||||
new_ucmd!()
|
||||
.args(&["a", "b", "c"])
|
||||
.fails()
|
||||
.stderr_is("basename: extra operand 'c'\nTry 'basename --help' for more information.");
|
||||
let ts = TestScenario::new(util_name!());
|
||||
ts.ucmd().args(&["a", "b", "c"]).fails().stderr_is(format!(
|
||||
"{0}: extra operand 'c'\nTry `{1} {0} --help` for more information.",
|
||||
ts.util_name,
|
||||
ts.bin_path.to_string_lossy()
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(any(unix, target_os = "redox"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue