(dir: &Path)
| 63 | use super::*; |
| 64 | |
| 65 | fn names(dir: &Path) -> Vec<String> { |
| 66 | let mut names: Vec<String> = fs::read_dir(dir) |
| 67 | .unwrap() |
| 68 | .map(|entry| entry.unwrap().file_name().to_string_lossy().into_owned()) |
| 69 | .collect(); |
| 70 | names.sort(); |
| 71 | names |
| 72 | } |
| 73 | |
| 74 | #[test] |
| 75 | fn keeps_the_newest_daily_files_and_nothing_else_is_touched() { |