mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
test: refactor error handling with ParseError enum
This commit is contained in:
parent
9fb18bb08c
commit
bf94e8fff1
4 changed files with 105 additions and 48 deletions
|
@ -928,3 +928,16 @@ fn test_long_integer() {
|
|||
])
|
||||
.fails();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_missing_argument_after() {
|
||||
let mut ucmd = new_ucmd!();
|
||||
|
||||
let result = ucmd.args(&["(", "foo"]).fails();
|
||||
result.no_stdout();
|
||||
assert_eq!(result.exit_status().code().unwrap(), 2);
|
||||
assert_eq!(
|
||||
result.stderr_str().trim(),
|
||||
"test: missing argument after 'foo'"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue