mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
mkdir: emit error when path is empty
This commit is contained in:
parent
5b881a0766
commit
80b63931a4
2 changed files with 18 additions and 0 deletions
|
@ -2,6 +2,9 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
|
||||
// spell-checker:ignore bindgen
|
||||
|
||||
#![allow(clippy::cast_sign_loss, clippy::cast_possible_truncation)]
|
||||
|
||||
use crate::common::util::TestScenario;
|
||||
|
@ -332,3 +335,11 @@ fn test_umask_compliance() {
|
|||
test_single_case(i as mode_t);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_empty_argument() {
|
||||
new_ucmd!()
|
||||
.arg("")
|
||||
.fails()
|
||||
.stderr_only("mkdir: cannot create directory '': No such file or directory\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue