mirror of
https://github.com/uutils/coreutils
synced 2024-12-12 14:22:41 +00:00
rmdir: require argument
This commit is contained in:
parent
6ad07a4fb3
commit
fe234164f4
2 changed files with 9 additions and 0 deletions
|
@ -195,6 +195,7 @@ pub fn uu_app() -> Command {
|
|||
Arg::new(ARG_DIRS)
|
||||
.action(ArgAction::Append)
|
||||
.num_args(1..)
|
||||
.required(true)
|
||||
.value_parser(ValueParser::os_string())
|
||||
.value_hint(clap::ValueHint::DirPath),
|
||||
)
|
||||
|
|
|
@ -29,6 +29,14 @@ fn test_invalid_arg() {
|
|||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_no_arg() {
|
||||
new_ucmd!()
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("error: the following required arguments were not provided:");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rmdir_empty_directory_no_parents() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Reference in a new issue