mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Merge pull request #6452 from sylvestre/base64
cksum/hashsum: add support of --check with base64 + other improvs
This commit is contained in:
commit
9b3b9e8407
5 changed files with 290 additions and 208 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