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

hashsum: allow multiple usage of -l and take the last one

tested by gnu/tests/cksum/b2sum.sh
This commit is contained in:
Sylvestre Ledru 2024-04-20 15:14:11 +02:00 committed by Ben Wiederhake
parent b64183b0de
commit dc5342d115
2 changed files with 18 additions and 1 deletions

View file

@ -180,6 +180,22 @@ fn test_check_b2sum_length_option_0() {
.stdout_only("testf: OK\n");
}
#[test]
fn test_check_b2sum_length_duplicate() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.write("testf", "foobar\n");
scene
.ccmd("b2sum")
.arg("--length=123")
.arg("--length=128")
.arg("testf")
.succeeds()
.stdout_contains("d6d45901dec53e65d2b55fb6e2ab67b0");
}
#[test]
fn test_check_b2sum_length_option_8() {
let scene = TestScenario::new(util_name!());