diff options
| author | Elly Jones <elly@leptoquark.net> | 2011-12-16 17:32:09 -0500 |
|---|---|---|
| committer | Elly Jones <elly@leptoquark.net> | 2011-12-16 17:37:21 -0500 |
| commit | 89e880d613bc797b3867f91cd7f676c9b4737397 (patch) | |
| tree | 1bdaa03dc685a13b84ff2954767f771e86bb8f21 /src/test/stdtest | |
| parent | b11268780ed7961c710d6a66665b82a2e5019a08 (diff) | |
| download | rust-89e880d613bc797b3867f91cd7f676c9b4737397.tar.gz rust-89e880d613bc797b3867f91cd7f676c9b4737397.zip | |
std: file_is_dir -> path_is_dir, add path_exists
Diffstat (limited to 'src/test/stdtest')
| -rw-r--r-- | src/test/stdtest/fs.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/test/stdtest/fs.rs b/src/test/stdtest/fs.rs index a57cebc332d..a9b1f5ea259 100644 --- a/src/test/stdtest/fs.rs +++ b/src/test/stdtest/fs.rs @@ -26,9 +26,15 @@ fn list_dir() { } #[test] -fn file_is_dir() { - assert (fs::file_is_dir(".")); - assert (!fs::file_is_dir("test/stdtest/fs.rs")); +fn path_is_dir() { + assert (fs::path_is_dir(".")); + assert (!fs::path_is_dir("test/stdtest/fs.rs")); +} + +#[test] +fn path_exists() { + assert (fs::path_exists(".")); + assert (!fs::path_exists("test/nonexistent-bogus-path")); } fn ps() -> str { @@ -214,4 +220,4 @@ fn splitext_nobasename() { let (base, ext) = fs::splitext("oh.my/"); assert base == "oh.my/"; assert ext == ""; -} \ No newline at end of file +} |
