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

cksum: fix error message when the flags length and an algorithm different from blake2b are present (#7071)

test length and blake2b algorithm before testing supported algorithms
This commit is contained in:
Tommaso Fellegara 2025-01-04 21:53:10 +01:00 committed by GitHub
parent fbea7c41ca
commit b15bc8440c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 4 deletions

View file

@ -352,6 +352,18 @@ fn test_length_not_supported() {
.no_stdout()
.stderr_contains("--length is only supported with --algorithm=blake2b")
.code_is(1);
new_ucmd!()
.arg("-l")
.arg("158")
.arg("-c")
.arg("-a")
.arg("crc")
.arg("/tmp/xxx")
.fails()
.no_stdout()
.stderr_contains("--length is only supported with --algorithm=blake2b")
.code_is(1);
}
#[test]