1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

Merge pull request #6790 from sgvictorino/require-mkdir-rmdir-args

mkdir/rmdir: require arguments
This commit is contained in:
Sylvestre Ledru 2024-10-20 17:15:25 +02:00 committed by GitHub
commit 5b881a0766
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 0 deletions

View file

@ -15,6 +15,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_mkdir_mkdir() {
new_ucmd!().arg("test_dir").succeeds();

View file

@ -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!();