1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests ~ fix tests for new execution_phrase!() and usage phrasing

This commit is contained in:
Roy Ivy III 2021-07-27 00:21:12 -05:00 committed by Michael Debertol
parent c0854000d1
commit 4da46d93c7
11 changed files with 96 additions and 48 deletions

View file

@ -85,11 +85,15 @@ fn test_wrap() {
#[test]
fn test_wrap_no_arg() {
for wrap_param in &["-w", "--wrap"] {
let expected_stderr = "error: The argument '--wrap <wrap>\' requires a value but none was \
supplied\n\nUSAGE:\n base32 [OPTION]... [FILE]\n\nFor more \
information try --help"
.to_string();
new_ucmd!()
let ts = TestScenario::new(util_name!());
let expected_stderr = &format!(
"error: The argument '--wrap <wrap>\' requires a value but none was \
supplied\n\nUSAGE:\n {1} {0} [OPTION]... [FILE]\n\nFor more \
information try --help",
ts.util_name,
ts.bin_path.to_string_lossy()
);
ts.ucmd()
.arg(wrap_param)
.fails()
.stderr_only(expected_stderr);