1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

hashsum: don't exit early on io errors

This commit is contained in:
Jeremy Smart 2025-05-11 19:10:08 -04:00
parent bcc02e9cea
commit 67acfbcbf3
No known key found for this signature in database
GPG key ID: 5AD8086D5DF29A8F
3 changed files with 39 additions and 8 deletions

View file

@ -98,6 +98,22 @@ macro_rules! test_digest {
.no_stderr()
.stdout_is(std::str::from_utf8(&expected).unwrap());
}
#[test]
fn test_missing_file() {
let ts = TestScenario::new("hashsum");
let at = &ts.fixtures;
at.write("a", "file1\n");
at.write("c", "file3\n");
ts.ucmd()
.args(&[DIGEST_ARG, BITS_ARG, "a", "b", "c"])
.fails()
.stdout_contains("a\n")
.stdout_contains("c\n")
.stderr_contains("b: No such file or directory");
}
}
)*)
}