mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
hashsum: ignore empty lines in --check
This commit is contained in:
parent
beb7395c84
commit
94f5e82dbd
2 changed files with 22 additions and 0 deletions
|
@ -457,6 +457,24 @@ fn test_with_escape_filename_zero_text() {
|
|||
assert!(stdout.contains("a\nb"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_check_empty_line() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("f");
|
||||
at.write(
|
||||
"in.md5",
|
||||
"d41d8cd98f00b204e9800998ecf8427e f\n\nd41d8cd98f00b204e9800998ecf8427e f\ninvalid\n\n",
|
||||
);
|
||||
scene
|
||||
.ccmd("md5sum")
|
||||
.arg("--check")
|
||||
.arg(at.subdir.join("in.md5"))
|
||||
.fails()
|
||||
.stderr_contains("WARNING: 1 line is improperly formatted");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(windows))]
|
||||
fn test_check_with_escape_filename() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue