mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
pinky, mktemp: Remove direct usage of CmdResult fields in test
This commit is contained in:
parent
0d1946a5d2
commit
7c7e64e79c
2 changed files with 13 additions and 23 deletions
|
@ -43,11 +43,9 @@ fn test_short_format_i() {
|
|||
let actual = TestScenario::new(util_name!())
|
||||
.ucmd()
|
||||
.args(&args)
|
||||
.run()
|
||||
.stdout;
|
||||
.succeeds()
|
||||
.stdout_move_str();
|
||||
let expect = expected_result(&args);
|
||||
println!("actual: {:?}", actual);
|
||||
println!("expect: {:?}", expect);
|
||||
let v_actual: Vec<&str> = actual.split_whitespace().collect();
|
||||
let v_expect: Vec<&str> = expect.split_whitespace().collect();
|
||||
assert_eq!(v_actual, v_expect);
|
||||
|
@ -62,11 +60,9 @@ fn test_short_format_q() {
|
|||
let actual = TestScenario::new(util_name!())
|
||||
.ucmd()
|
||||
.args(&args)
|
||||
.run()
|
||||
.stdout;
|
||||
.succeeds()
|
||||
.stdout_move_str();
|
||||
let expect = expected_result(&args);
|
||||
println!("actual: {:?}", actual);
|
||||
println!("expect: {:?}", expect);
|
||||
let v_actual: Vec<&str> = actual.split_whitespace().collect();
|
||||
let v_expect: Vec<&str> = expect.split_whitespace().collect();
|
||||
assert_eq!(v_actual, v_expect);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue