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

hashsum: rename the blake2b algo with --tag + manage the different length

This commit is contained in:
Sylvestre Ledru 2024-05-18 10:04:48 +02:00
parent 7a46ea371f
commit a9a11f486e
2 changed files with 35 additions and 6 deletions

View file

@ -243,6 +243,30 @@ fn test_invalid_b2sum_length_option_too_large() {
.code_is(1);
}
#[test]
fn test_check_b2sum_tag_output() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch("f");
scene
.ccmd("b2sum")
.arg("--length=0")
.arg("--tag")
.arg("f")
.succeeds()
.stdout_only("BLAKE2b (f) = 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce\n");
scene
.ccmd("b2sum")
.arg("--length=128")
.arg("--tag")
.arg("f")
.succeeds()
.stdout_only("BLAKE2b-128 (f) = cae66941d9efbd404e4d88758ea67670\n");
}
#[test]
fn test_check_file_not_found_warning() {
let scene = TestScenario::new(util_name!());