Skip to content

Commit ea40134

Browse files
committed
Add regression test for rust-lang#107495
1 parent 1dea922 commit ea40134

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
extern crate run_make_support;
2+
3+
use run_make_support::{aux_build, out_dir};
4+
use std::fs;
5+
#[cfg(unix)]
6+
use std::os::unix::fs::PermissionsExt;
7+
use std::path::Path;
8+
9+
fn main() {
10+
aux_build().arg("foo.rs").run();
11+
verify(&out_dir().join("libfoo.rlib"));
12+
}
13+
14+
fn verify(path: &Path) {
15+
let perm = fs::metadata(path).unwrap().permissions();
16+
17+
assert!(!perm.readonly());
18+
19+
// Check that the file is readable for everyone
20+
#[cfg(unix)]
21+
assert_eq!(perm.mode(), 0o100664);
22+
}

0 commit comments

Comments
 (0)