mirror of
https://github.com/gbdev/rgbds.git
synced 2026-01-04 23:51:52 +00:00
Rewrite RGBFIX
- Make it work inside pipelines - Add RGBFIX tests to the suite - Be more flexible in accepted MBC names - Add warnings for dangerous or nonsensical input params - Improve man page
This commit is contained in:
1
test/fix/.gitignore
vendored
Normal file
1
test/fix/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/padding*_*
|
||||
16
test/fix/README.md
Normal file
16
test/fix/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# RGBFIX tests
|
||||
|
||||
These tests check that RGBFIX behaves properly.
|
||||
|
||||
## Structure of a test
|
||||
|
||||
- `test.bin`: The file passed as input to RGBFIX.
|
||||
- `test.flags`: The command-line flags passed to RGBFIX's invocation.
|
||||
Actually, only the first line is considered; the rest of the file may contain comments about the test.
|
||||
- `test.gb`: The expected output.
|
||||
May not exist, generally when the test expects an error, in which case the comparison is skipped.
|
||||
- `test.err`: The expected error output.
|
||||
|
||||
## Special tests
|
||||
|
||||
- `noexist.err` is the expected error output when RGBFIX is given a non-existent input file.
|
||||
3
test/fix/bad-fix-char.bin
Normal file
3
test/fix/bad-fix-char.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
‡Ýà!H0‡;<ýNË—ñãí=ÌÊÏç^{KC}b“Q¤&<14>3ð ñ/]¿—¹”d<E2809D>ÙZ=ÃÀ¢bÄaËi:öeSŸ>ñ›U@¼Ay<aeš‰¹$vfÅåˆâ”šý¬gŒ VC†ò~>•‘¨þ©† ³s_CÓ›Úç&nWFoKÚšíX`'ñêÁ§ë·blƒ{‡›Œ¿
|
||||
‹¯çÎ8îù†<$:VÍ"ã³™Ú<E284A2>h™ÑD©¤Ð¶ñQcµïØÐ㸺Zû§T†ž©ø½¨ºVÛ¼ÝtÅ’ªÏ4ªBèÐdT“« ÄI<1A>‡
|
||||
Ô(/×»ç¿{hÝ:ƒ<>QmÓ$*|
|
||||
3
test/fix/bad-fix-char.err
Normal file
3
test/fix/bad-fix-char.err
Normal file
@@ -0,0 +1,3 @@
|
||||
warning: Ignoring 'm' in fix spec
|
||||
warning: Ignoring 'a' in fix spec
|
||||
warning: Ignoring 'o' in fix spec
|
||||
1
test/fix/bad-fix-char.flags
Normal file
1
test/fix/bad-fix-char.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f lmao
|
||||
2
test/fix/color.bin
Normal file
2
test/fix/color.bin
Normal file
@@ -0,0 +1,2 @@
|
||||
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7┌Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|
|
||||
╕>Т]Е/╧K╠▄Ыd~ис"gF*AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═
|
||||
0
test/fix/color.err
Normal file
0
test/fix/color.err
Normal file
1
test/fix/color.flags
Normal file
1
test/fix/color.flags
Normal file
@@ -0,0 +1 @@
|
||||
-C
|
||||
2
test/fix/color.gb
Normal file
2
test/fix/color.gb
Normal file
@@ -0,0 +1,2 @@
|
||||
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7┌Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|
|
||||
╕>Т]Е/╧K╠▄Ыd~ис"gF*AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═
|
||||
BIN
test/fix/compatible.bin
Normal file
BIN
test/fix/compatible.bin
Normal file
Binary file not shown.
0
test/fix/compatible.err
Normal file
0
test/fix/compatible.err
Normal file
1
test/fix/compatible.flags
Normal file
1
test/fix/compatible.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c
|
||||
BIN
test/fix/compatible.gb
Normal file
BIN
test/fix/compatible.gb
Normal file
Binary file not shown.
0
test/fix/empty.bin
Normal file
0
test/fix/empty.bin
Normal file
2
test/fix/empty.err
Normal file
2
test/fix/empty.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: "<filename>" too short, expected at least 336 ($150) bytes, got only 0
|
||||
Fixing "<filename>" failed with 1 error
|
||||
0
test/fix/empty.flags
Normal file
0
test/fix/empty.flags
Normal file
0
test/fix/empty.gb
Normal file
0
test/fix/empty.gb
Normal file
BIN
test/fix/fix-override.bin
Normal file
BIN
test/fix/fix-override.bin
Normal file
Binary file not shown.
1
test/fix/fix-override.err
Normal file
1
test/fix/fix-override.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: 'l' overriding 'L' in fix spec
|
||||
1
test/fix/fix-override.flags
Normal file
1
test/fix/fix-override.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f Ll
|
||||
BIN
test/fix/fix-override.gb
Normal file
BIN
test/fix/fix-override.gb
Normal file
Binary file not shown.
BIN
test/fix/gameid-trunc.bin
Normal file
BIN
test/fix/gameid-trunc.bin
Normal file
Binary file not shown.
1
test/fix/gameid-trunc.err
Normal file
1
test/fix/gameid-trunc.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: Truncating game ID "FOUR!" to 4 chars
|
||||
1
test/fix/gameid-trunc.flags
Normal file
1
test/fix/gameid-trunc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-i 'FOUR!'
|
||||
BIN
test/fix/gameid-trunc.gb
Normal file
BIN
test/fix/gameid-trunc.gb
Normal file
Binary file not shown.
BIN
test/fix/gameid.bin
Normal file
BIN
test/fix/gameid.bin
Normal file
Binary file not shown.
0
test/fix/gameid.err
Normal file
0
test/fix/gameid.err
Normal file
1
test/fix/gameid.flags
Normal file
1
test/fix/gameid.flags
Normal file
@@ -0,0 +1 @@
|
||||
-i RGBD
|
||||
BIN
test/fix/gameid.gb
Normal file
BIN
test/fix/gameid.gb
Normal file
Binary file not shown.
BIN
test/fix/global-large.bin
Normal file
BIN
test/fix/global-large.bin
Normal file
Binary file not shown.
0
test/fix/global-large.err
Normal file
0
test/fix/global-large.err
Normal file
1
test/fix/global-large.flags
Normal file
1
test/fix/global-large.flags
Normal file
@@ -0,0 +1 @@
|
||||
-fg
|
||||
BIN
test/fix/global-large.gb
Normal file
BIN
test/fix/global-large.gb
Normal file
Binary file not shown.
BIN
test/fix/global-larger.bin
Normal file
BIN
test/fix/global-larger.bin
Normal file
Binary file not shown.
0
test/fix/global-larger.err
Normal file
0
test/fix/global-larger.err
Normal file
1
test/fix/global-larger.flags
Normal file
1
test/fix/global-larger.flags
Normal file
@@ -0,0 +1 @@
|
||||
-fg
|
||||
BIN
test/fix/global-larger.gb
Normal file
BIN
test/fix/global-larger.gb
Normal file
Binary file not shown.
BIN
test/fix/global-trash.bin
Normal file
BIN
test/fix/global-trash.bin
Normal file
Binary file not shown.
0
test/fix/global-trash.err
Normal file
0
test/fix/global-trash.err
Normal file
1
test/fix/global-trash.flags
Normal file
1
test/fix/global-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f G
|
||||
BIN
test/fix/global-trash.gb
Normal file
BIN
test/fix/global-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/global.bin
Normal file
BIN
test/fix/global.bin
Normal file
Binary file not shown.
0
test/fix/global.err
Normal file
0
test/fix/global.err
Normal file
1
test/fix/global.flags
Normal file
1
test/fix/global.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f g
|
||||
BIN
test/fix/global.gb
Normal file
BIN
test/fix/global.gb
Normal file
Binary file not shown.
BIN
test/fix/header-edit.bin
Normal file
BIN
test/fix/header-edit.bin
Normal file
Binary file not shown.
0
test/fix/header-edit.err
Normal file
0
test/fix/header-edit.err
Normal file
2
test/fix/header-edit.flags
Normal file
2
test/fix/header-edit.flags
Normal file
@@ -0,0 +1,2 @@
|
||||
-Cf h
|
||||
Checks that the header checksum properly accounts for header modifications
|
||||
BIN
test/fix/header-edit.gb
Normal file
BIN
test/fix/header-edit.gb
Normal file
Binary file not shown.
BIN
test/fix/header-trash.bin
Normal file
BIN
test/fix/header-trash.bin
Normal file
Binary file not shown.
0
test/fix/header-trash.err
Normal file
0
test/fix/header-trash.err
Normal file
1
test/fix/header-trash.flags
Normal file
1
test/fix/header-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f H
|
||||
BIN
test/fix/header-trash.gb
Normal file
BIN
test/fix/header-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/header.bin
Normal file
BIN
test/fix/header.bin
Normal file
Binary file not shown.
0
test/fix/header.err
Normal file
0
test/fix/header.err
Normal file
1
test/fix/header.flags
Normal file
1
test/fix/header.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f h
|
||||
BIN
test/fix/header.gb
Normal file
BIN
test/fix/header.gb
Normal file
Binary file not shown.
BIN
test/fix/jp.bin
Normal file
BIN
test/fix/jp.bin
Normal file
Binary file not shown.
0
test/fix/jp.err
Normal file
0
test/fix/jp.err
Normal file
1
test/fix/jp.flags
Normal file
1
test/fix/jp.flags
Normal file
@@ -0,0 +1 @@
|
||||
-j
|
||||
BIN
test/fix/jp.gb
Normal file
BIN
test/fix/jp.gb
Normal file
Binary file not shown.
BIN
test/fix/logo-trash.bin
Normal file
BIN
test/fix/logo-trash.bin
Normal file
Binary file not shown.
0
test/fix/logo-trash.err
Normal file
0
test/fix/logo-trash.err
Normal file
1
test/fix/logo-trash.flags
Normal file
1
test/fix/logo-trash.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f L
|
||||
BIN
test/fix/logo-trash.gb
Normal file
BIN
test/fix/logo-trash.gb
Normal file
Binary file not shown.
BIN
test/fix/logo.bin
Normal file
BIN
test/fix/logo.bin
Normal file
Binary file not shown.
0
test/fix/logo.err
Normal file
0
test/fix/logo.err
Normal file
1
test/fix/logo.flags
Normal file
1
test/fix/logo.flags
Normal file
@@ -0,0 +1 @@
|
||||
-f l
|
||||
BIN
test/fix/logo.gb
Normal file
BIN
test/fix/logo.gb
Normal file
Binary file not shown.
BIN
test/fix/mbc.bin
Normal file
BIN
test/fix/mbc.bin
Normal file
Binary file not shown.
0
test/fix/mbc.err
Normal file
0
test/fix/mbc.err
Normal file
1
test/fix/mbc.flags
Normal file
1
test/fix/mbc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-m 177
|
||||
BIN
test/fix/mbc.gb
Normal file
BIN
test/fix/mbc.gb
Normal file
Binary file not shown.
BIN
test/fix/mbcless-ram.bin
Normal file
BIN
test/fix/mbcless-ram.bin
Normal file
Binary file not shown.
1
test/fix/mbcless-ram.err
Normal file
1
test/fix/mbcless-ram.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: MBC "ROM" has no RAM, but RAM size was set to 2
|
||||
1
test/fix/mbcless-ram.flags
Normal file
1
test/fix/mbcless-ram.flags
Normal file
@@ -0,0 +1 @@
|
||||
-m ROM -r 2
|
||||
BIN
test/fix/mbcless-ram.gb
Normal file
BIN
test/fix/mbcless-ram.gb
Normal file
Binary file not shown.
3
test/fix/new-lic-trunc.bin
Normal file
3
test/fix/new-lic-trunc.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw<C39A>™Ď
|
||||
1
test/fix/new-lic-trunc.err
Normal file
1
test/fix/new-lic-trunc.err
Normal file
@@ -0,0 +1 @@
|
||||
warning: Truncating new licensee "HOMEBREW" to 2 chars
|
||||
1
test/fix/new-lic-trunc.flags
Normal file
1
test/fix/new-lic-trunc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-k HOMEBREW
|
||||
3
test/fix/new-lic-trunc.gb
Normal file
3
test/fix/new-lic-trunc.gb
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& šÿÅyàåSÐìäÒaJ¨ò‘'ZDÉyºè§1nŸ
|
||||
¬íÙ9µQñH¼pç¹yF›Ÿ”»ÑÕߘÐÖ8^ªŠ]Àb³¢ F‰§mÅ“š
|
||||
ױьM–‡FíîWóÕwþk÷°± O`ØÚíèUì0ñär©íºÆÎ™Ü¥â±7"®”"fêàˆïfw– Xë<58>:ÐÞ¸ò½XpéVËĪ\-¶`x<>²ø*NðÕy†a4ÄJÅç´Äë¡ãÜŠ¼p—„¾.7öc+ÝQ<C39D>øÕŽ·B÷He<48>z¼–§1ÊO<n_&KHh£´‹v‘Žûx榢Y¢—ÈAÙÇæÌ;Cêo¿lý :ü®¥®¿Ì’ýÜ©!–føì¾<>P¥`@¸:‡z‰v‰½ädé£ZÓ"±a*m*.:?¤£ï¿ÏYHOc3”È >#`çí\_Úw<C39A>™Ï
|
||||
3
test/fix/new-lic.bin
Normal file
3
test/fix/new-lic.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw<C39A>™Ď
|
||||
0
test/fix/new-lic.err
Normal file
0
test/fix/new-lic.err
Normal file
1
test/fix/new-lic.flags
Normal file
1
test/fix/new-lic.flags
Normal file
@@ -0,0 +1 @@
|
||||
-k HB
|
||||
3
test/fix/new-lic.gb
Normal file
3
test/fix/new-lic.gb
Normal file
@@ -0,0 +1,3 @@
|
||||
€ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź
|
||||
¬íŮ9µQńHĽpçąyF›ź”»ŃŐß<C590>ĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
|
||||
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕ<C499>ďfw– Xë<58>:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQ<C39D>řŐŽ·B÷He<48>zĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü®Ą®żĚ’ýÜ©!–fřěľ<>PĄ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYHBc3”Č >#`çí\_Úw<C39A>™Ď
|
||||
2
test/fix/noexist.err
Normal file
2
test/fix/noexist.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: Failed to open "noexist" for reading+writing: No such file or directory
|
||||
Fixing "noexist" failed with 1 error
|
||||
BIN
test/fix/old-lic-hex.bin
Normal file
BIN
test/fix/old-lic-hex.bin
Normal file
Binary file not shown.
0
test/fix/old-lic-hex.err
Normal file
0
test/fix/old-lic-hex.err
Normal file
1
test/fix/old-lic-hex.flags
Normal file
1
test/fix/old-lic-hex.flags
Normal file
@@ -0,0 +1 @@
|
||||
-l 0x2a
|
||||
BIN
test/fix/old-lic-hex.gb
Normal file
BIN
test/fix/old-lic-hex.gb
Normal file
Binary file not shown.
2
test/fix/old-lic.bin
Normal file
2
test/fix/old-lic.bin
Normal file
@@ -0,0 +1,2 @@
|
||||
”EZ/:ÂÔÎ øÐ€šÜJ/ŒÝõÊ_<ð&ÑA¢Ž˜ÃXgAP
|
||||
`°1@Wh<>õ||ø»e뻬e^"7(*YV<59>ÍTõœ‘OY!Þâ Ì”]‚ˆ’=ÎðÈy–V~xæaÛ]á;Ÿúý¡ÀzUmòüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)G<05>v(k¨ª”g,<2C>p*@ùÚ!¶Dõ„0kãÿ§á<C2A7>eË%ÇšodÛñÎ$r‰ÚÊ<è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQi‚DŸfÝ3<C39D>s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\šSŠ]óoúåm'2D#/grÕW3¸Î§<C38E>°&UÓÌ÷EgMhÚ-A¾6ƒ…²ÿ…4M|1âq0Oì*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP
|
||||
0
test/fix/old-lic.err
Normal file
0
test/fix/old-lic.err
Normal file
1
test/fix/old-lic.flags
Normal file
1
test/fix/old-lic.flags
Normal file
@@ -0,0 +1 @@
|
||||
-l 42
|
||||
2
test/fix/old-lic.gb
Normal file
2
test/fix/old-lic.gb
Normal file
@@ -0,0 +1,2 @@
|
||||
”EZ/:ÂÔÎ øÐ€šÜJ/ŒÝõÊ_<ð&ÑA¢Ž˜ÃXgAP
|
||||
`°1@Wh<>õ||ø»e뻬e^"7(*YV<59>ÍTõœ‘OY!Þâ Ì”]‚ˆ’=ÎðÈy–V~xæaÛ]á;Ÿúý¡ÀzUmòüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)G<05>v(k¨ª”g,<2C>p*@ùÚ!¶Dõ„0kãÿ§á<C2A7>eË%ÇšodÛñÎ$r‰ÚÊ<è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQi‚DŸfÝ3<C39D>s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\šSŠ]óoúåm'2D#/grÕW3¸Î§<C38E>°&UÓÌ÷EgMhÚ-A¾*6ƒ…²ÿ…4M|1âq0Oì*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP
|
||||
BIN
test/fix/padding-bigperfect.bin
Normal file
BIN
test/fix/padding-bigperfect.bin
Normal file
Binary file not shown.
0
test/fix/padding-bigperfect.err
Normal file
0
test/fix/padding-bigperfect.err
Normal file
1
test/fix/padding-bigperfect.flags
Normal file
1
test/fix/padding-bigperfect.flags
Normal file
@@ -0,0 +1 @@
|
||||
-p0xff
|
||||
BIN
test/fix/padding-bigperfect.gb
Normal file
BIN
test/fix/padding-bigperfect.gb
Normal file
Binary file not shown.
BIN
test/fix/padding-imperfect.bin
Normal file
BIN
test/fix/padding-imperfect.bin
Normal file
Binary file not shown.
0
test/fix/padding-imperfect.err
Normal file
0
test/fix/padding-imperfect.err
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user