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

Merge pull request #6584 from howjmay/checksum-no-check

hashsum: Return err when only --strict or --quiet is given
This commit is contained in:
Daniel Hofstetter 2024-07-23 15:20:35 +02:00 committed by GitHub
commit 79d7158aac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 1 deletions

View file

@ -874,6 +874,19 @@ fn test_check_quiet() {
.fails()
.stdout_contains("f: FAILED")
.stderr_contains("WARNING: 1 computed checksum did NOT match");
scene
.ccmd("md5sum")
.arg("--quiet")
.arg(at.subdir.join("in.md5"))
.fails()
.stderr_contains("md5sum: the --quiet option is meaningful only when verifying checksums");
scene
.ccmd("md5sum")
.arg("--strict")
.arg(at.subdir.join("in.md5"))
.fails()
.stderr_contains("md5sum: the --strict option is meaningful only when verifying checksums");
}
#[test]