mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
basename: tests for bad inputs
This commit is contained in:
parent
8190c30a85
commit
e44f29a020
1 changed files with 16 additions and 0 deletions
|
@ -74,3 +74,19 @@ fn test_zero_param() {
|
|||
expect_successful_stdout(vec![zero_param, "-a", path, path], "baz\0baz\0");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_option() {
|
||||
let path = "/foo/bar/baz";
|
||||
expect_error(vec!["-q", path], "");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_no_args() {
|
||||
expect_error(vec![], "");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_too_many_args() {
|
||||
expect_error(vec!["a", "b", "c"], "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue