mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
refactor tests (#1982)
This commit is contained in:
parent
0ea35f3fbc
commit
646c6cacbc
25 changed files with 373 additions and 521 deletions
|
@ -10,7 +10,7 @@ fn test_groups() {
|
|||
// As seems to be a configuration issue, ignoring it
|
||||
return;
|
||||
}
|
||||
assert!(result.success);
|
||||
result.success();
|
||||
assert!(!result.stdout_str().trim().is_empty());
|
||||
}
|
||||
|
||||
|
@ -30,16 +30,12 @@ fn test_groups_arg() {
|
|||
|
||||
println!("result.stdout = {}", result.stdout_str());
|
||||
println!("result.stderr = {}", result.stderr_str());
|
||||
assert!(result.success);
|
||||
result.success();
|
||||
assert!(!result.stdout_str().is_empty());
|
||||
let username = result.stdout_str().trim();
|
||||
|
||||
// call groups with the user name to check that we
|
||||
// are getting something
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.arg(username).run();
|
||||
println!("result.stdout = {}", result.stdout_str());
|
||||
println!("result.stderr = {}", result.stderr_str());
|
||||
assert!(result.success);
|
||||
new_ucmd!().arg(username).succeeds();
|
||||
assert!(!result.stdout_str().is_empty());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue