1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

rmdir: match GNU error output

Related to #2258
This commit is contained in:
Dean Li 2021-05-30 10:45:54 +08:00
parent dc63133f14
commit 9f1deb2df6
No known key found for this signature in database
GPG key ID: 4F55BB69D480672A
2 changed files with 25 additions and 0 deletions

View file

@ -108,3 +108,19 @@ fn test_rmdir_ignore_nonempty_directory_with_parents() {
assert!(at.dir_exists(dir));
}
#[test]
fn test_rmdir_remove_symlink_match_gnu_error() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "file";
let fl = "fl";
at.touch(file);
assert!(at.file_exists(file));
at.symlink_file(file, fl);
assert!(at.file_exists(fl));
ucmd.arg("fl/")
.fails()
.stderr_is("rmdir: failed to remove 'fl/': Not a directory");
}