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

basename: tests for bad inputs

This commit is contained in:
Nathan Ross 2016-02-16 02:17:04 -05:00
parent 8190c30a85
commit e44f29a020

View file

@ -74,3 +74,19 @@ fn test_zero_param() {
expect_successful_stdout(vec![zero_param, "-a", path, path], "baz\0baz\0"); 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"], "");
}