mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
cksum/hashsum: add support of --check with base64
This commit is contained in:
parent
32c5d23f91
commit
66ccb1a479
2 changed files with 90 additions and 1 deletions
|
@ -1201,3 +1201,23 @@ fn test_check_directory_error() {
|
|||
.fails()
|
||||
.stderr_contains(err_msg);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_check_base64_hashes() {
|
||||
let hashes =
|
||||
"MD5 (empty) = 1B2M2Y8AsgTpgAmY7PhCfg==\nSHA256 (empty) = 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\nBLAKE2b (empty) = eGoC90IBWQPGxv2FJVLScpEvR0DhWEdhiobiF/cfVBnSXhAxr+5YUxOJZESTTrBLkDpoWxRIt1XVb3Aa/pvizg==\n"
|
||||
;
|
||||
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("empty");
|
||||
at.write("check", hashes);
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--check")
|
||||
.arg(at.subdir.join("check"))
|
||||
.succeeds()
|
||||
.stdout_is("empty: OK\nempty: OK\nempty: OK\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue