diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2024-05-25 10:04:40 +0200 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2024-05-29 09:08:04 +0200 |
commit | 0882eea07cfea875ae0891aefc96144510205cb7 (patch) | |
tree | 825238d6400b93fa21dc5444035a4832750033d1 /tests | |
parent | dbe7a20e08f0efdcb5418d00aaa16771de79757e (diff) |
cksum/hashsum: factor the error structure and use it more
Diffstat (limited to 'tests')
-rw-r--r-- | tests/by-util/test_cksum.rs | 3 | ||||
-rw-r--r-- | tests/by-util/test_hashsum.rs | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/by-util/test_cksum.rs b/tests/by-util/test_cksum.rs index 3498f589f..c1bd492c9 100644 --- a/tests/by-util/test_cksum.rs +++ b/tests/by-util/test_cksum.rs @@ -561,8 +561,7 @@ fn test_blake2b_512() { .arg("--check") .arg("checksum") .succeeds() - .stdout_contains("") - .stderr_contains(""); + .no_output(); } #[test] diff --git a/tests/by-util/test_hashsum.rs b/tests/by-util/test_hashsum.rs index 424a9b56e..c6199fdc1 100644 --- a/tests/by-util/test_hashsum.rs +++ b/tests/by-util/test_hashsum.rs @@ -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] |