mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
cksum: also handle the case when the line start with ' \'
This commit is contained in:
parent
58c2b5d421
commit
9c52ca8d55
2 changed files with 20 additions and 1 deletions
|
@ -809,6 +809,25 @@ fn test_cksum_check_space() {
|
|||
.stderr_contains("line is improperly formatted");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cksum_check_leading_info() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("f");
|
||||
at.write("CHECKSUM", "\
|
||||
\\SHA384 (f) = 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b\n\
|
||||
\\BLAKE2b (f) = 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce\n\
|
||||
\\BLAKE2b-384 (f) = b32811423377f52d7862286ee1a72ee540524380fda1724a6f25d7978c6fd3244a6caf0498812673c5e05ef583825100\n\
|
||||
\\SM3 (f) = 1ab21d8355cfa17f8e61194831e81a8f22bec8c728fefb747ed035eb5082aa2b\n");
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--check")
|
||||
.arg("CHECKSUM")
|
||||
.succeeds()
|
||||
.stdout_contains("f: OK\nf: OK\nf: OK\nf: OK\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cksum_check() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue