1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

szip: cleanup after tests

This commit is contained in:
Delyan Angelov 2021-11-28 15:30:26 +02:00
parent dc610a9a80
commit 969e0dce20
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -10,9 +10,21 @@ const (
fpath2 = os.join_path(test_path, fname2)
)
fn test_szip_create_temp_files() ? {
fn cleanup() {
os.chdir(os.temp_dir()) or {}
os.rmdir_all(test_path) or {}
os.rm(test_out_zip) or {}
}
fn testsuite_begin() ? {
cleanup()
}
fn testsuite_end() ? {
cleanup()
}
fn test_szip_create_temp_files() ? {
os.mkdir(test_path) ?
os.write_file(fpath1, 'file one') ?
os.write_file(fpath2, 'file two') ?