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:
@ -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