1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

Merge pull request #5803 from D9nni/cksum

cksum: Add --raw argument
This commit is contained in:
Sylvestre Ledru 2024-01-10 18:36:08 +01:00 committed by GitHub
commit 19a9380089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 90 additions and 2 deletions

View file

@ -287,6 +287,30 @@ fn test_length_is_zero() {
.stdout_is_fixture("length_is_zero.expected");
}
#[test]
fn test_raw_single_file() {
for algo in ALGOS {
new_ucmd!()
.arg("--raw")
.arg("lorem_ipsum.txt")
.arg(format!("--algorithm={algo}"))
.succeeds()
.no_stderr()
.stdout_is_fixture_bytes(format!("raw/{algo}_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);
}
#[test]
fn test_blake2b_fail_on_directory() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -0,0 +1 @@
— ‘‰å`Ãxœ ÿf†øWÑûþEtÞBãÀl«¹W^Jö0šaX´ÓÀ8Á´<C381>5<15>BÍÀ9m•Ã

View file

@ -0,0 +1 @@
<1F>

View file

@ -0,0 +1 @@
訓h

Binary file not shown.

View file

@ -0,0 +1 @@
<EFBFBD>к<>؈:=<18>m毽(%,<2C><>

Binary file not shown.

View file

@ -0,0 +1 @@
÷Ä P 0P gê^ <09>SkEþœC[Ù+?

View file

@ -0,0 +1,3 @@
K荵
2吠鋳<19><EFBFBD>マクアト/g胤€コ囹LZ{WZ3Sゥ
H

View file

@ -0,0 +1 @@
Td«%VªÕ޼sØšÒ!åYyu)ì¯ÀôfÁ•ÏöÖâÆ |T,ýBn^Oऊ¡VgºD k!=Í<03>ú

View file

@ -0,0 +1 @@
m)k€] þÒ(ß0<C39F>»CyMÔíg@¡iÂ

View file

@ -0,0 +1 @@
I