test remove_dir_all
This commit is contained in:
parent
57786678d4
commit
65469fe85b
@ -17,7 +17,6 @@ impl Dlsym {
|
||||
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
|
||||
Ok(match name {
|
||||
"getentropy" => Some(Dlsym::getentropy),
|
||||
"openat" => None, // std has a fallback for this
|
||||
_ => throw_unsup_format!("unsupported macOS dlsym: {}", name),
|
||||
})
|
||||
}
|
||||
|
@ -395,6 +395,12 @@ fn test_directory() {
|
||||
remove_dir(&dir_path).unwrap();
|
||||
// Reading the metadata of a non-existent directory should fail with a "not found" error.
|
||||
assert_eq!(ErrorKind::NotFound, check_metadata(&[], &dir_path).unwrap_err().kind());
|
||||
|
||||
// To test remove_dir_all, re-create the directory with a file and a directory in it.
|
||||
create_dir(&dir_path).unwrap();
|
||||
drop(File::create(&path_1).unwrap());
|
||||
create_dir(&path_2).unwrap();
|
||||
remove_dir_all(&dir_path).unwrap();
|
||||
}
|
||||
|
||||
fn test_dup_stdout_stderr() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user