Skip to content

Commit

Permalink
Add mkmamedb test for the 'mia' tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed May 16, 2024
1 parent cf27139 commit 769a439
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions regress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(DBS
mamedb-file-no-crc.db
mamedb-lost-parent-ok.db
mamedb-merge-parent.db
mamedb-mia.db
mamedb-no-data.db
mamedb-one-game-two-roms.db
mamedb-parent-crcdiff.db
Expand Down
25 changes: 25 additions & 0 deletions regress/mamedb-mia.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<datafile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://datomatic.no-intro.org/stuff https://datomatic.no-intro.org/stuff/schema_nointro_datfile_v3.xsd">
<header>
<id>100000</id>
<name>Nointro-MIA-test</name>
<description>Nointro Test for MIA tag</description>
<version>20240518-151515</version>
<author>ckmame</author>
<clrmamepro forcenodump="required"/>
</header>
<game name="1-mia" id="0001">
<description>single file, MIA</description>
<rom name="04.rom" size="4" crc="d87f7e0c" md5="098f6bcd4621d373cade4e832627b4f6" sha1="a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" mia="yes" />
</game>
<game name="2-1mia" id="0002">
<description>two files, one MIA</description>
<rom name="04.rom" size="4" crc="d87f7e0c" md5="098f6bcd4621d373cade4e832627b4f6" sha1="a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" mia="yes" />
<rom name="08.rom" size="8" crc="3656897d" md5="095ca6fcc1279865662b553147eb8f6d" sha1="111bb8b7549e3386a996845405b02164f17c7b37" />
</game>
<game name="2-2mia" id="0003">
<description>two files, both MIA</description>
<rom name="04.rom" size="4" crc="d87f7e0c" md5="098f6bcd4621d373cade4e832627b4f6" sha1="a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" mia="yes" />
<rom name="0c.rom" size="12" crc="0623c932" md5="b60c52bf4849067f0b57c8bd30985466" sha1="2f2d205d5451d3256cf1c693982b40101e9989bf" mia="yes"/>
</game>
</datafile>
14 changes: 14 additions & 0 deletions regress/mamedb-mia.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
>>> table dat (dat_idx, name, description, author, version)
0|Nointro-MIA-test|Nointro Test for MIA tag|<null>|20240518-151515
>>> table file (game_id, file_type, file_idx, name, merge, status, location, size, crc, md5, sha1, sha256, missing)
1|0|0|04.rom|<null>|0|0|4|3632233996|<098f6bcd4621d373cade4e832627b4f6>|<a94a8fe5ccb19ba61c4c0873d391e987982fbbd3>|<null>|1
2|0|0|04.rom|<null>|0|0|4|3632233996|<098f6bcd4621d373cade4e832627b4f6>|<a94a8fe5ccb19ba61c4c0873d391e987982fbbd3>|<null>|1
2|0|1|08.rom|<null>|0|0|8|911640957|<095ca6fcc1279865662b553147eb8f6d>|<111bb8b7549e3386a996845405b02164f17c7b37>|<null>|0
3|0|0|04.rom|<null>|0|0|4|3632233996|<098f6bcd4621d373cade4e832627b4f6>|<a94a8fe5ccb19ba61c4c0873d391e987982fbbd3>|<null>|1
3|0|1|0c.rom|<null>|0|0|12|103008562|<b60c52bf4849067f0b57c8bd30985466>|<2f2d205d5451d3256cf1c693982b40101e9989bf>|<null>|1
>>> table game (game_id, name, parent, description, dat_idx)
1|1-mia|<null>|single file, MIA|0
2|2-1mia|<null>|two files, one MIA|0
3|2-2mia|<null>|two files, both MIA|0
>>> table rule (rule_idx, start_offset, end_offset, operation)
>>> table test (rule_idx, test_idx, type, offset, size, mask, value, result)
6 changes: 6 additions & 0 deletions regress/mamedb-mia.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description test mkmamedb database creation, ok
return 0
program mkmamedb
arguments mamedb.dat
file mamedb.dat mamedb-mia.dat
file mame.db {} mamedb-mia.dump

0 comments on commit 769a439

Please sign in to comment.