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:
parent
c0854000d1
commit
4da46d93c7
11 changed files with 96 additions and 48 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue