Skip to content

Commit 65469fe

Browse files
committed
test remove_dir_all
1 parent 5778667 commit 65469fe

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/shims/posix/macos/dlsym.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ impl Dlsym {
1717
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
1818
Ok(match name {
1919
"getentropy" => Some(Dlsym::getentropy),
20-
"openat" => None, // std has a fallback for this
2120
_ => throw_unsup_format!("unsupported macOS dlsym: {}", name),
2221
})
2322
}

tests/run-pass/fs.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ fn test_directory() {
395395
remove_dir(&dir_path).unwrap();
396396
// Reading the metadata of a non-existent directory should fail with a "not found" error.
397397
assert_eq!(ErrorKind::NotFound, check_metadata(&[], &dir_path).unwrap_err().kind());
398+
399+
// To test remove_dir_all, re-create the directory with a file and a directory in it.
400+
create_dir(&dir_path).unwrap();
401+
drop(File::create(&path_1).unwrap());
402+
create_dir(&path_2).unwrap();
403+
remove_dir_all(&dir_path).unwrap();
398404
}
399405

400406
fn test_dup_stdout_stderr() {

0 commit comments

Comments
 (0)