mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
test: refactor error handling with ParseError enum
This commit is contained in:
@@ -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'"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user