mirror of
https://github.com/ArthurDanjou/rustlings.git
synced 2026-01-18 05:58:01 +01:00
add tests
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user