mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests: use CmdResult::usage_error
This commit is contained in:
parent
f43dfa9a61
commit
c9624725ab
9 changed files with 34 additions and 87 deletions
|
@ -22,15 +22,10 @@ fn test_negative_adjustment() {
|
|||
|
||||
#[test]
|
||||
fn test_adjustment_with_no_command_should_error() {
|
||||
let ts = TestScenario::new(util_name!());
|
||||
|
||||
ts.ucmd()
|
||||
.args(&["-n", "19"])
|
||||
.run()
|
||||
.stderr_is(&format!("{0}: A command must be given with an adjustment.\nTry '{1} {0} --help' for more information.\n",
|
||||
ts.util_name,
|
||||
ts.bin_path.to_string_lossy()
|
||||
));
|
||||
new_ucmd!()
|
||||
.args(&["-n", "19"])
|
||||
.fails()
|
||||
.usage_error("A command must be given with an adjustment.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue