From 153614c40ed3578f4f4e12be5ce285be4fb384a0 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sat, 1 Oct 2022 12:26:54 +0200 Subject: [PATCH] tests: update to clap 4 --- tests/common/util.rs | 1 + tests/test_util_name.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index bdf4ebd20..cc25a6889 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -1856,6 +1856,7 @@ mod tests { // This error was first detected when running tail so tail is used here but // should fail with any command that takes piped input. // See also https://github.com/uutils/coreutils/issues/3895 + #[cfg(feature = "tail")] #[test] #[cfg_attr(not(feature = "expensive_tests"), ignore)] fn test_when_piped_input_then_no_broken_pipe() { diff --git a/tests/test_util_name.rs b/tests/test_util_name.rs index 76b6f4728..04b874b0b 100644 --- a/tests/test_util_name.rs +++ b/tests/test_util_name.rs @@ -21,7 +21,7 @@ fn execution_phrase_double() { .unwrap(); assert!(String::from_utf8(output.stderr) .unwrap() - .contains(&format!("USAGE:\n {} ls", scenario.bin_path.display(),))); + .contains(&format!("Usage: {} ls", scenario.bin_path.display(),))); } #[test] @@ -36,8 +36,9 @@ fn execution_phrase_single() { .arg("--some-invalid-arg") .output() .unwrap(); + dbg!(String::from_utf8(output.stderr.clone()).unwrap()); assert!(String::from_utf8(output.stderr).unwrap().contains(&format!( - "USAGE:\n {}", + "Usage: {}", scenario.fixtures.plus("uu-ls").display() ))); }