mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #810 from ebfe/tests-chmod
tests/chmod: fix tests on nightly
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ struct TestCase {
|
||||
}
|
||||
|
||||
fn mkfile(file: &str, mode: mode_t) {
|
||||
std::fs::OpenOptions::new().mode(mode).create(true).open(file).unwrap();
|
||||
std::fs::OpenOptions::new().mode(mode).create(true).write(true).open(file).unwrap();
|
||||
let mut perms = std::fs::metadata(file).unwrap().permissions();
|
||||
perms.set_mode(mode);
|
||||
std::fs::set_permissions(file, perms).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user