Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 45cb9d8

Browse files
committedMar 19, 2024
Add regression test for #107495
1 parent 91b87c4 commit 45cb9d8

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
 
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
+22
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)
Please sign in to comment.