diff --git a/src/test/run-pass/stat.rs b/src/test/run-pass/stat.rs index a3774d58ee786..d07da255c5d52 100644 --- a/src/test/run-pass/stat.rs +++ b/src/test/run-pass/stat.rs @@ -20,7 +20,7 @@ use std::uint; pub fn main() { let dir = tempfile::mkdtemp(&Path("."), "").unwrap(); - let path = dir.with_filename("file"); + let path = dir.push("file"); { match io::file_writer(&path, [io::Create, io::Truncate]) { @@ -36,5 +36,6 @@ pub fn main() { assert!(path.exists()); assert_eq!(path.get_size(), Some(1000)); + os::remove_file(&path); os::remove_dir(&dir); }