mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Fix some tests to not use CmdResult fields
This commit is contained in:
parent
4695667c7c
commit
81d42aa2b3
22 changed files with 353 additions and 478 deletions
|
@ -32,13 +32,10 @@ fn test_first_100000_integers() {
|
|||
}
|
||||
|
||||
println!("STDIN='{}'", instring);
|
||||
let result = new_ucmd!().pipe_in(instring.as_bytes()).run();
|
||||
let stdout = result.stdout;
|
||||
|
||||
assert!(result.success);
|
||||
let result = new_ucmd!().pipe_in(instring.as_bytes()).succeeds();
|
||||
|
||||
// `seq 0 100000 | factor | sha1sum` => "4ed2d8403934fa1c76fe4b84c5d4b8850299c359"
|
||||
let hash_check = sha1::Sha1::from(stdout.as_bytes()).hexdigest();
|
||||
let hash_check = sha1::Sha1::from(result.stdout()).hexdigest();
|
||||
assert_eq!(hash_check, "4ed2d8403934fa1c76fe4b84c5d4b8850299c359");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue