Skip to content

Commit cdf7e24

Browse files
committed
---
yaml --- r: 149942 b: refs/heads/try2 c: 164b7c2 h: refs/heads/master v: v3
1 parent 963e3fe commit cdf7e24

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2d754b49daa897656f6df5aa24b7560dbc35205e
8+
refs/heads/try2: 164b7c22b69ed69854c0e579e051f851181673b0
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/io/fs.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,36 @@ mod test {
968968
check!(rmdir(dir));
969969
})
970970

971+
iotest!(fn recursive_mkdir() {
972+
let tmpdir = tmpdir();
973+
let dir = tmpdir.join("d1/d2");
974+
check!(mkdir_recursive(&dir, io::UserRWX));
975+
assert!(dir.is_dir())
976+
})
977+
971978
iotest!(fn recursive_mkdir_slash() {
972979
check!(mkdir_recursive(&Path::new("/"), io::UserRWX));
973980
})
974981

982+
// FIXME(#12795) depends on lstat to work on windows
983+
#[cfg(not(windows))]
984+
iotest!(fn recursive_rmdir() {
985+
let tmpdir = tmpdir();
986+
let d1 = tmpdir.join("d1");
987+
let dt = d1.join("t");
988+
let dtt = dt.join("t");
989+
let d2 = tmpdir.join("d2");
990+
let canary = d2.join("do_not_delete");
991+
check!(mkdir_recursive(&dtt, io::UserRWX));
992+
check!(mkdir_recursive(&d2, io::UserRWX));
993+
check!(File::create(&canary).write(bytes!("foo")));
994+
check!(symlink(&d2, &dt.join("d2")));
995+
check!(rmdir_recursive(&d1));
996+
997+
assert!(!d1.is_dir());
998+
assert!(canary.exists());
999+
})
1000+
9751001
iotest!(fn unicode_path_is_dir() {
9761002
assert!(Path::new(".").is_dir());
9771003
assert!(!Path::new("test/stdtest/fs.rs").is_dir());

0 commit comments

Comments
 (0)