1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

cksum/hashsum: factor the error structure and use it more

This commit is contained in:
Sylvestre Ledru 2024-05-25 10:04:40 +02:00
parent dbe7a20e08
commit 0882eea07c
5 changed files with 93 additions and 106 deletions

View file

@ -370,7 +370,7 @@ fn test_check_md5sum_not_enough_space() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
for f in &["a", " b"] {
for f in ["a", "b"] {
at.write(f, &format!("{f}\n"));
}
at.write(
@ -384,8 +384,7 @@ fn test_check_md5sum_not_enough_space() {
.arg("-c")
.arg("check.md5sum")
.fails()
.stdout_is("")
.stderr_is("md5sum: check.md5sum: no properly formatted checksum lines found\nmd5sum: WARNING: 2 lines are improperly formatted\n");
.stderr_only("md5sum: check.md5sum: no properly formatted checksum lines found\nmd5sum: WARNING: 2 lines are improperly formatted\n");
}
#[test]