mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
mkdir: explicitly set umask when testing mode
This commit is contained in:
parent
9a6d47759b
commit
c561074425
1 changed files with 5 additions and 0 deletions
|
@ -162,9 +162,14 @@ fn test_symbolic_mode() {
|
|||
fn test_symbolic_alteration() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let default_umask = 0o022;
|
||||
let original_umask = unsafe { umask(default_umask) };
|
||||
|
||||
ucmd.arg("-m").arg("-w").arg(TEST_DIR1).succeeds();
|
||||
let perms = at.metadata(TEST_DIR1).permissions().mode();
|
||||
assert_eq!(perms, 0o40577);
|
||||
|
||||
unsafe { umask(original_umask) };
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue