Skip to content

Commit

Permalink
Added non-empty dir error
Browse files Browse the repository at this point in the history
Just another test in the test_rm_errors fn that runs rm -d on the same
dir as the previous test
  • Loading branch information
billyb2 committed Mar 9, 2021
1 parent bc0aa1c commit 7781047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/by-util/test_rm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ fn test_rm_errors() {
"rm: error: could not remove directory 'test_rm_errors_directory' (did you mean \
to pass '-r'?)\n",
);

// $ rm -d test_rm_errors_directory
// rm: cannot remove 'test_rm_errors_directory_2': Directory not empty
ucmd.arg("-d").arg(dir).fails().stderr_is(
"rm: cannot remove 'test_rm_errors_directory': Directory not empty\n"
);
}

#[test]
Expand Down

0 comments on commit 7781047

Please sign in to comment.