b2sum: added test for length option

This commit is contained in:
Marras Antoine 2023-04-10 20:27:49 +02:00
parent ae1113d7dc
commit 0798cfe155

View file

@ -125,6 +125,23 @@ fn test_check_sha1() {
.stderr_is(""); .stderr_is("");
} }
#[test]
fn test_check_b2sum_length_option() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.write("testf", "foobar\n");
at.write("testf.b2sum", "6a testf\n");
scene
.ccmd("b2sum")
.arg("--length=8")
.arg("-c")
.arg(at.subdir.join("testf.b2sum"))
.succeeds()
.stdout_only("testf: OK\n");
}
#[test] #[test]
fn test_check_file_not_found_warning() { fn test_check_file_not_found_warning() {
let scene = TestScenario::new(util_name!()); let scene = TestScenario::new(util_name!());