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

cksum: read the next file when the first is missing or invalid

This commit is contained in:
Sylvestre Ledru 2024-07-01 23:36:09 +02:00
parent 69b603bfe7
commit a6c5ee576a
2 changed files with 45 additions and 5 deletions

View file

@ -2,7 +2,7 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore (words) asdf algo algos
// spell-checker:ignore (words) asdf algo algos mgmt
use crate::common::util::TestScenario;
@ -1221,3 +1221,32 @@ fn test_check_base64_hashes() {
.succeeds()
.stdout_is("empty: OK\nempty: OK\nempty: OK\n");
}
#[test]
fn test_several_files_error_mgmt() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
// don't exist
scene
.ucmd()
.arg("--check")
.arg("empty")
.arg("incorrect")
.fails()
.stderr_contains("empty: No such file ")
.stderr_contains("incorrect: No such file ");
at.touch("empty");
at.touch("incorrect");
// exists but incorrect
scene
.ucmd()
.arg("--check")
.arg("empty")
.arg("incorrect")
.fails()
.stderr_contains("empty: no properly ")
.stderr_contains("incorrect: no properly ");
}