src/backup/backup_info.rs - prune: improve algorythm

This commit is contained in:
Dietmar Maurer
2019-12-05 18:41:28 +01:00
parent 659da6c957
commit 6f47dd8a0f
2 changed files with 19 additions and 6 deletions

View File

@ -134,6 +134,7 @@ fn test_prune_simple() -> Result<(), Error> {
let remove_list = get_prune_list(list, None, Some(1), Some(5), None, None);
let expect: Vec<PathBuf> = vec![
PathBuf::from("host/elsa/2019-12-02T11:59:15Z"),
PathBuf::from("host/elsa/2019-12-03T11:59:15Z"),
PathBuf::from("host/elsa/2019-12-04T11:59:15Z"),
];
assert_eq!(remove_list, expect);