mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
hashsum: handle the case when md5sum is used but the file contains a different algo
This commit is contained in:
parent
0882eea07c
commit
89b7a1a8fb
3 changed files with 37 additions and 4 deletions
|
@ -1057,15 +1057,21 @@ fn test_cksum_mixed() {
|
|||
let result = scene.ucmd().args(command).arg("f").succeeds();
|
||||
at.append("CHECKSUM", result.stdout_str());
|
||||
}
|
||||
scene
|
||||
println!("Content of CHECKSUM:\n{}", at.read("CHECKSUM"));
|
||||
let result = scene
|
||||
.ucmd()
|
||||
.arg("--check")
|
||||
.arg("-a")
|
||||
.arg("sm3")
|
||||
.arg("CHECKSUM")
|
||||
.succeeds()
|
||||
.stdout_contains("f: OK")
|
||||
.stderr_contains("3 lines are improperly formatted");
|
||||
.succeeds();
|
||||
|
||||
println!("result.stderr_str() {}", result.stderr_str());
|
||||
println!("result.stdout_str() {}", result.stdout_str());
|
||||
assert!(result.stdout_str().contains("f: OK"));
|
||||
assert!(result
|
||||
.stderr_str()
|
||||
.contains("3 lines are improperly formatted"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue