1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests/chmod: fix tests on nightly

This commit is contained in:
Michael Gehring 2016-01-23 05:04:32 +01:00
parent 7cb0db8928
commit 033dd3a0ae

View file

@ -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();