test(cksum): add tests for -z/--zero

This commit is contained in:
Dorian Péron 2024-10-24 00:29:45 +02:00
parent 0b31e43fac
commit e9cf31451e
3 changed files with 19 additions and 0 deletions

View file

@ -1383,3 +1383,22 @@ fn test_check_failed_to_read() {
.stdout_is("dir: FAILED open or read\n")
.stderr_contains("cksum: WARNING: 1 listed file could not be read");
}
#[test]
fn test_zero_multiple_file() {
new_ucmd!()
.arg("-z")
.arg("alice_in_wonderland.txt")
.arg("lorem_ipsum.txt")
.succeeds()
.stdout_is_fixture("zero_multiple_file.expected");
}
#[test]
fn test_zero_single_file() {
new_ucmd!()
.arg("--zero")
.arg("alice_in_wonderland.txt")
.succeeds()
.stdout_is_fixture("zero_single_file.expected");
}

Binary file not shown.

Binary file not shown.