mirror of
https://github.com/uutils/coreutils
synced 2025-01-20 17:14:21 +00:00
Merge pull request #4086 from uutils/revert-4027-test-hashsum-nonames
Revert "hashsum: test b3sum::test_nonames for real"
This commit is contained in:
commit
c8ae1add80
2 changed files with 6 additions and 5 deletions
|
@ -276,10 +276,11 @@ pub fn uumain(mut args: impl uucore::Args) -> UResult<()> {
|
||||||
};
|
};
|
||||||
let check = matches.get_flag("check");
|
let check = matches.get_flag("check");
|
||||||
let tag = matches.get_flag("tag");
|
let tag = matches.get_flag("tag");
|
||||||
let nonames = *matches
|
let nonames = if binary_name == "b3sum" {
|
||||||
.try_get_one("no-names")
|
matches.get_flag("no-names")
|
||||||
.unwrap_or(Some(&false))
|
} else {
|
||||||
.unwrap();
|
false
|
||||||
|
};
|
||||||
let status = matches.get_flag("status");
|
let status = matches.get_flag("status");
|
||||||
let quiet = matches.get_flag("quiet") || status;
|
let quiet = matches.get_flag("quiet") || status;
|
||||||
let strict = matches.get_flag("strict");
|
let strict = matches.get_flag("strict");
|
||||||
|
|
|
@ -34,7 +34,7 @@ macro_rules! test_digest {
|
||||||
fn test_nonames() {
|
fn test_nonames() {
|
||||||
let ts = TestScenario::new("hashsum");
|
let ts = TestScenario::new("hashsum");
|
||||||
// EXPECTED_FILE has no newline character at the end
|
// EXPECTED_FILE has no newline character at the end
|
||||||
if DIGEST_ARG == "--b3sum" {
|
if DIGEST_ARG == "b3sum" {
|
||||||
// Option only available on b3sum
|
// Option only available on b3sum
|
||||||
assert_eq!(format!("{0}\n{0}\n", ts.fixtures.read(EXPECTED_FILE)),
|
assert_eq!(format!("{0}\n{0}\n", ts.fixtures.read(EXPECTED_FILE)),
|
||||||
ts.ucmd().arg(DIGEST_ARG).arg(BITS_ARG).arg("--no-names").arg("input.txt").arg("-").pipe_in_fixture("input.txt")
|
ts.ucmd().arg(DIGEST_ARG).arg(BITS_ARG).arg("--no-names").arg("input.txt").arg("-").pipe_in_fixture("input.txt")
|
||||||
|
|
Loading…
Reference in a new issue