Skip write_error test if running as root (#1881)
This commit is contained in:
parent
5a36e685e5
commit
d55b5c2bdd
@ -103,6 +103,13 @@ fn unstable_passed() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn write_error() {
|
fn write_error() {
|
||||||
|
// skip this test if running as root, since root can write files even if
|
||||||
|
// permissions would otherwise forbid it
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
if unsafe { libc::getuid() } == 0 {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let tempdir = temptree! {
|
let tempdir = temptree! {
|
||||||
justfile: "x := 'hello' ",
|
justfile: "x := 'hello' ",
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user