Skip to content

Commit c1c4fb1

Browse files
committed
add create_dir test
1 parent c58a2d8 commit c1c4fb1

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
@@ -2167,3 +2167,11 @@ fn test_dir_rename_file() {
21672167
check!(f.read_exact(&mut buf));
21682168
assert_eq!(b"bar", &buf);
21692169
}
2170+
2171+
#[test]
2172+
fn test_dir_create_dir() {
2173+
let tmpdir = tmpdir();
2174+
let dir = check!(Dir::new(tmpdir.path()));
2175+
check!(dir.create_dir("foo"));
2176+
check!(Dir::new(tmpdir.join("foo")));
2177+
}

0 commit comments

Comments
 (0)