chore(dump): add tests

This commit is contained in:
Tamo 2022-04-28 10:48:57 +02:00 committed by Irevoire
parent ae4e419db4
commit 5f0e9b63d2
No known key found for this signature in database
GPG key ID: 7A6A970C96104F1B
23 changed files with 853 additions and 142 deletions

View file

@ -256,13 +256,8 @@ fn extract_dump(
.parent()
.map(ToOwned::to_owned)
.unwrap_or_else(|| ".".into());
if cfg!(windows) {
std::env::set_var("TMP", temp_path);
} else {
std::env::set_var("TMPDIR", temp_path);
}
let tmp_src = tempfile::tempdir()?;
let tmp_src = tempfile::tempdir_in(temp_path)?;
let tmp_src_path = tmp_src.path();
from_tar_gz(&src_path, tmp_src_path)?;