We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e3455b + 6f852b5 commit 5000107Copy full SHA for 5000107
tests/pass-dep/shims/fs.rs
@@ -404,6 +404,14 @@ fn test_directory() {
404
let mut file_names = dir_iter.map(|e| e.unwrap().file_name()).collect::<Vec<_>>();
405
file_names.sort_unstable();
406
assert_eq!(file_names, vec!["test_file_1", "test_file_2"]);
407
+ // Test that read_dir metadata calls succeed
408
+ assert_eq!(
409
+ &[true, true],
410
+ &*read_dir(&dir_path)
411
+ .unwrap()
412
+ .map(|e| e.unwrap().metadata().unwrap().is_file())
413
+ .collect::<Vec<_>>()
414
+ );
415
// Deleting the directory should fail, since it is not empty.
416
assert_eq!(ErrorKind::DirectoryNotEmpty, remove_dir(&dir_path).unwrap_err().kind());
417
// Clean up the files in the directory
0 commit comments