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

cksum: handle an error like GNU

This commit is contained in:
Sylvestre Ledru 2024-04-20 21:21:03 +02:00 committed by Ben Wiederhake
parent 10d8fd6f98
commit 234f2f9508
2 changed files with 22 additions and 0 deletions

View file

@ -277,6 +277,18 @@ fn test_untagged_algorithm_stdin() {
}
}
#[test]
fn test_check_algo() {
new_ucmd!()
.arg("-a=bsd")
.arg("--check")
.arg("lorem_ipsum.txt")
.fails()
.no_stdout()
.stderr_contains("cksum: --check is not supported with --algorithm={bsd,sysv,crc}")
.code_is(1);
}
#[test]
fn test_length_with_wrong_algorithm() {
new_ucmd!()