about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/fs/tests.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs
index 6d67c396c62..3fa731c9529 100644
--- a/library/std/src/fs/tests.rs
+++ b/library/std/src/fs/tests.rs
@@ -1360,6 +1360,12 @@ fn read_dir_not_found() {
 }
 
 #[test]
+fn file_open_not_found() {
+    let res = File::open("/path/that/does/not/exist");
+    assert_eq!(res.err().unwrap().kind(), ErrorKind::NotFound);
+}
+
+#[test]
 fn create_dir_all_with_junctions() {
     let tmpdir = tmpdir();
     let target = tmpdir.join("target");