self_run resume: clearing a missing kept dir is nothing, an unreadable one an error
This commit is contained in:
parent
8ceee68009
commit
725facb183
1 changed files with 9 additions and 0 deletions
|
|
@ -290,3 +290,12 @@ fn a_changed_seed_file_or_link_target_changes_the_digest_and_an_identical_copy_d
|
|||
assert!(!spawner_over(state.path(), state.path(), None).kept().unwrap().same_seed);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn clearing_a_kept_directory_that_does_not_exist_is_nothing_and_one_that_cannot_be_read_is_an_error() {
|
||||
let state = tempfile::tempdir().unwrap();
|
||||
let spawner = spawner_over(state.path(), state.path(), None);
|
||||
spawner.keep(None).expect("no directory is already clear");
|
||||
write(&state.path().join("session"), "a file where the directory belongs");
|
||||
assert!(spawner.keep(None).is_err(), "a conversation that cannot be cleared is told, not swallowed");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue