ref: caaf7a8444a1bb8f5045b8874a2d0ddd0b1cc665
parent: a5ed0292b110606df51f607427cdd17f86f10f04
author: ISSOtm <eldredhabert0@gmail.com>
date: Fri May 20 14:37:11 EDT 2022
Test VRA0 size as well in randtilegen tests
--- a/test/gfx/test.sh
+++ b/test/gfx/test.sh
@@ -26,19 +26,15 @@
}
+# 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