mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
refactor tests (#1982)
This commit is contained in:
parent
0ea35f3fbc
commit
646c6cacbc
25 changed files with 373 additions and 521 deletions
|
@ -120,19 +120,15 @@ fn test_truncate_with_set1_shorter_than_set2() {
|
|||
#[test]
|
||||
fn missing_args_fails() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.run();
|
||||
|
||||
assert!(!result.success);
|
||||
assert!(result.stderr.contains("missing operand"));
|
||||
ucmd.fails().stderr_contains("missing operand");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn missing_required_second_arg_fails() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.args(&["foo"]).run();
|
||||
|
||||
assert!(!result.success);
|
||||
assert!(result.stderr.contains("missing operand after"));
|
||||
ucmd.args(&["foo"])
|
||||
.fails()
|
||||
.stderr_contains("missing operand after");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue