1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Added test to validate that it now generates the error for an arbitrary directory

This commit is contained in:
Atomei Alexandru Constantin 2024-01-08 00:08:24 +02:00
parent 288ad97878
commit 0bfd4bbdf7

View file

@ -286,3 +286,17 @@ fn test_length_is_zero() {
.no_stderr()
.stdout_is_fixture("length_is_zero.expected");
}
#[test]
fn test_blake2b_fail_on_directory() {
let (at, mut ucmd) = at_and_ucmd!();
let folder_name = "a_folder";
at.mkdir(folder_name);
ucmd.arg("--algorithm=blake2b")
.arg(folder_name)
.fails()
.no_stdout()
.stderr_contains(format!("cksum: {folder_name}: Is a directory"));
}