Skip to content

Commit 3fab5f4

Browse files
committed
add create_dir test
1 parent 7767828 commit 3fab5f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/std/src/fs/tests.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,3 +2107,11 @@ fn test_dir_rename_file() {
21072107
check!(f.read_exact(&mut buf));
21082108
assert_eq!(b"bar", &buf);
21092109
}
2110+
2111+
#[test]
2112+
fn test_dir_create_dir() {
2113+
let tmpdir = tmpdir();
2114+
let dir = check!(Dir::new(tmpdir.path()));
2115+
check!(dir.create_dir("foo"));
2116+
check!(Dir::new(tmpdir.join("foo")));
2117+
}

0 commit comments

Comments
 (0)