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

cksum: added tests for --raw and fixed fmt whitespace error

This commit is contained in:
D9nni 2024-01-08 08:51:06 +02:00
parent 8c1fc8b287
commit f03ef79bc8
2 changed files with 30 additions and 9 deletions

View file

@ -286,3 +286,25 @@ fn test_length_is_zero() {
.no_stderr()
.stdout_is_fixture("length_is_zero.expected");
}
#[test]
fn test_raw_single_file() {
new_ucmd!()
.arg("--raw")
.arg("lorem_ipsum.txt")
.succeeds()
.no_stderr()
.stdout_is_fixture("raw_single_file.expected");
}
#[test]
fn test_raw_multiple_files() {
new_ucmd!()
.arg("--raw")
.arg("lorem_ipsum.txt")
.arg("alice_in_wonderland.txt")
.fails()
.no_stdout()
.stderr_contains("cksum: the --raw option is not supported with multiple files")
.code_is(1);
}