Skip to content

Commit 0079249

Browse files
committed
Add tests for non-existing files
1 parent ffc47de commit 0079249

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/run-pass/file_manipulation.rs

+4
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ fn main() {
2323
assert_eq!(bytes, contents.as_slice());
2424
// Removing file should succeed
2525
remove_file(path).unwrap();
26+
// Opening non-existing file should fail
27+
assert!(File::open(path).is_err());
28+
// Removing non-existing file should fail
29+
assert!(remove_file(path).is_err());
2630
}

0 commit comments

Comments
 (0)