Skip to content

Commit

Permalink
Fix the Unix permission tests affected by rust-lang/rust#44624.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Dec 1, 2017
1 parent 016bf56 commit ed1791c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/rustup-dist/tests/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,21 +337,21 @@ fn unix_permissions() {
let tx = pkg.install(&components, "mycomponent", None, tx).unwrap();
tx.commit();

let m = fs::metadata(instdir.path().join("bin/foo")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("bin/foo")).unwrap().permissions().mode();
assert_eq!(m, 0o755);
let m = fs::metadata(instdir.path().join("lib/bar")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("lib/bar")).unwrap().permissions().mode();
assert_eq!(m, 0o644);
let m = fs::metadata(instdir.path().join("lib/foobar")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("lib/foobar")).unwrap().permissions().mode();
assert_eq!(m, 0o755);
let m = fs::metadata(instdir.path().join("doc/stuff/")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("doc/stuff/")).unwrap().permissions().mode();
assert_eq!(m, 0o755);
let m = fs::metadata(instdir.path().join("doc/stuff/doc1")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("doc/stuff/doc1")).unwrap().permissions().mode();
assert_eq!(m, 0o644);
let m = fs::metadata(instdir.path().join("doc/stuff/morestuff")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("doc/stuff/morestuff")).unwrap().permissions().mode();
assert_eq!(m, 0o755);
let m = fs::metadata(instdir.path().join("doc/stuff/morestuff/doc2")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("doc/stuff/morestuff/doc2")).unwrap().permissions().mode();
assert_eq!(m, 0o644);
let m = fs::metadata(instdir.path().join("doc/stuff/morestuff/tool")).unwrap().permissions().mode();
let m = 0o777 & fs::metadata(instdir.path().join("doc/stuff/morestuff/tool")).unwrap().permissions().mode();
assert_eq!(m, 0o755);
}

Expand Down

0 comments on commit ed1791c

Please sign in to comment.