From caaf7a8444a1bb8f5045b8874a2d0ddd0b1cc665 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 20 May 2022 18:37:11 +0200 Subject: [PATCH] Test VRA0 size as well in randtilegen tests --- test/gfx/test.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/gfx/test.sh b/test/gfx/test.sh index 764a0267..81534a75 100755 --- a/test/gfx/test.sh +++ b/test/gfx/test.sh @@ -26,19 +26,15 @@ fail() { } +# Draw a random tile offset and VRA0 size +# Neither should change anything to how the image is displayed +while [[ "$ofs" -eq 0 ]]; do (( ofs = RANDOM % 256 )); done +while [[ "$size" -eq 0 ]]; do (( size = RANDOM % 256 )); done for f in *.bin; do - new_test ./rgbgfx_test "$f" - test || fail $? -done - -# Re-run the tests, but this time, pass a random (non-zero) tile offset -# A tile offset should not change anything to how the image is displayed -while [[ "$ofs" -eq 0 ]]; do - ofs=$((RANDOM % 256)) -done -for f in *.bin; do - new_test ./rgbgfx_test "$f" -b "$ofs" - test || fail $? + for flags in "" "-b $ofs" "-N $size,256" "-b $ofs -N $size,256"; do + new_test ./rgbgfx_test "$f" $flags + test || fail $? + done done # Remove temporaries (also ignored by Git) created by the above tests