diff options
| author | lyn <819880950@qq.com> | 2019-03-20 21:05:45 +0100 |
|---|---|---|
| committer | lyn <819880950@qq.com> | 2019-03-20 21:05:45 +0100 |
| commit | f43cb124f6163216218fe397d78b00e2d3bda84c (patch) | |
| tree | 06a6c5c4c7af2839c9f15ac5e1ddfde4e28e817b /src | |
| parent | 11875aed6e6940231b711470c9a8d731a7ba6aa1 (diff) | |
add tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs index 37a2028..4a96ee9 100644 --- a/src/util.rs +++ b/src/util.rs @@ -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()); +} |
