1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

hashsum: add --zero option (#4612) (#4632)

* `hashsum`: add `--zero`  option (#4612)
This commit is contained in:
0xMRTT 2023-03-28 23:26:11 +02:00 committed by GitHub
parent 2447849bdc
commit e7ef9dcd46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -53,6 +53,14 @@ macro_rules! test_digest {
.stdout_is("input.txt: OK\n");
}
#[test]
fn test_zero() {
let ts = TestScenario::new("hashsum");
assert_eq!(ts.fixtures.read(EXPECTED_FILE),
get_hash!(ts.ucmd().arg(DIGEST_ARG).arg(BITS_ARG).arg("--zero").arg("input.txt").succeeds().no_stderr().stdout_str()));
}
#[cfg(windows)]
#[test]
fn test_text_mode() {