Skip to content

Commit 6c407d0

Browse files
committed
Add a testcase.
1 parent 95e1702 commit 6c407d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/fs/tests.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,12 @@ fn read_dir_not_found() {
13591359
assert_eq!(res.err().unwrap().kind(), ErrorKind::NotFound);
13601360
}
13611361

1362+
#[test]
1363+
fn file_open_not_found() {
1364+
let res = File::open("/path/that/does/not/exist");
1365+
assert_eq!(res.err().unwrap().kind(), ErrorKind::NotFound);
1366+
}
1367+
13621368
#[test]
13631369
fn create_dir_all_with_junctions() {
13641370
let tmpdir = tmpdir();

0 commit comments

Comments
 (0)