Skip to content

Commit

Permalink
Add two more working test cases for zip files with directories
Browse files Browse the repository at this point in the history
* A test for zip file with both a redundant directory and empty
  directories that should be retained.
* A check that trrntzip -d removes the empty directories, even
  if the file has a proper TORRENTZIPPED comment.
  • Loading branch information
miller-alex committed Mar 17, 2024
1 parent 80fbe30 commit b64d4ec
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions regress/directories-2-d.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description strip directories from already torrentzipped archive with only empty directories
return 0
arguments -l -d directories-2.zip
file directories-2.zip directories-2.tzip empty.tzip
stdout
Rezipping - directories-2.zip
--------------------------------------------------
Directory a/c/ Removed
Directory b/ Removed
--------------------------------------------------
Rezipped 0 compressed files totaling 0 bytes.
end-of-inline-data
13 changes: 13 additions & 0 deletions regress/directories-2.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description torrentzip a zip archive with only directories, some empty
return 0
arguments -l directories-2.zip
file directories-2.zip directories-2.zip directories-2.tzip
stdout
Rezipping - directories-2.zip
--------------------------------------------------
Directory a/ Removed
Adding - a/c/ (0 bytes)...Done
Adding - b/ (0 bytes)...Done
--------------------------------------------------
Rezipped 2 compressed files totaling 0 bytes.
end-of-inline-data
Binary file added regress/directories-2.tzip
Binary file not shown.
Binary file added regress/directories-2.zip
Binary file not shown.

0 comments on commit b64d4ec

Please sign in to comment.