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

Merge pull request #810 from ebfe/tests-chmod

tests/chmod: fix tests on nightly
This commit is contained in:
Alex Lyon 2016-01-23 19:43:54 -08:00
commit 9d041cdd7d

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