mirror of
https://github.com/notohh/rustlings.git
synced 2025-07-05 16:09:16 -04:00
add tests
This commit is contained in:
parent
11875aed6e
commit
f43cb124f6
7 changed files with 90 additions and 0 deletions
src
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue