1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-07-01 00:45:17 +02:00

add tests

This commit is contained in:
lyn
2019-03-20 21:05:45 +01:00
parent 11875aed6e
commit f43cb124f6
7 changed files with 90 additions and 0 deletions

View File

@ -3,3 +3,10 @@ use std::fs::remove_file;
pub fn clean() {
let _ignored = remove_file("temp");
}
#[test]
fn test_clean() {
std::fs::File::create("temp").unwrap();
clean();
assert!(!std::path::Path::new("temp").exists());
}