]> git.lizzy.rs Git - rust.git/commitdiff
Test that src path of rename is no longer a file
authorDavid Cook <divergentdave@gmail.com>
Sun, 9 Feb 2020 04:40:46 +0000 (22:40 -0600)
committerDavid Cook <divergentdave@gmail.com>
Sun, 9 Feb 2020 04:40:46 +0000 (22:40 -0600)
tests/run-pass/fs.rs

index 9e1891adf34eac489b87dc592fdd34c4c461aac0..e9132fbd61db5b1b1928f8b21a31dfb5eab3099c 100644 (file)
@@ -91,6 +91,7 @@ fn main() {
     let file = File::create(&path1).unwrap();
     drop(file);
     rename(&path1, &path2).unwrap();
+    assert_eq!(ErrorKind::NotFound, path1.metadata().unwrap_err().kind());
     assert!(path2.metadata().unwrap().is_file());
     remove_file(&path2).ok();