Skip to content

Commit

Permalink
Add failing test for cache when using torrentzip
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Aug 23, 2023
1 parent 9323085 commit 5ee6647
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions regress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(DBS
mamedb-one-game-two-roms.db
mamedb-parent-crcdiff.db
mamedb-parent-no-common.db
mamedb-reversesorted.db
mamedb-size-empty.db
mamedb-small.db
mamedb-two-games.db
Expand Down Expand Up @@ -108,6 +109,7 @@ set(XFAIL_TESTS
file-no-crc-wrong-name-other-set.test
rom-from-extra-loose-directory.test
rom-from-extra-loose-toplevel.test
torrentzip-cache.test
unknown-rename-failed.test
)

Expand Down
10 changes: 10 additions & 0 deletions regress/mamedb-reversesorted.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clrmamepro (
)

game (
name 2-48
description 2-48
rom ( name 08.rom size 8 crc 3656897d md5 095ca6fcc1279865662b553147eb8f6d sha1 111bb8b7549e3386a996845405b02164f17c7b37 )
rom ( name 04.rom size 4 crc d87f7e0c md5 098f6bcd4621d373cade4e832627b4f6 sha1 a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 )
)

17 changes: 17 additions & 0 deletions regress/torrentzip-cache.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description test single-rom game (no parent), add missing rom, torrentzip it
variants zip
return 0
args -D ../mamedb-reversesorted.db -Fjvc -e extra --use-torrentzip 2-48
file-new roms/2-48.zip 2-48-ok.zip
file-del extra/2-48.zip 2-48-ok.zip
stdout-data
In game 2-48:
rom 08.rom size 8 crc 3656897d: is in 'extra/2-48.zip/08.rom'
rom 04.rom size 4 crc d87f7e0c: is in 'extra/2-48.zip/04.rom'
add 'extra/2-48.zip/08.rom' as '08.rom'
add 'extra/2-48.zip/04.rom' as '04.rom'
In archive extra/2-48.zip:
delete used file '04.rom'
delete used file '08.rom'
remove empty archive
end-of-data

0 comments on commit 5ee6647

Please sign in to comment.