1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

mkdir: explicitly set umask when testing mode

This commit is contained in:
John Shin 2023-05-23 15:45:04 -07:00
parent 9a6d47759b
commit c561074425

View file

@ -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]