Implement -c #none (#1301)

Also adds a test case for round-tripping `-r` with `-c #none`.
This commit is contained in:
Evie
2024-03-03 18:45:33 -05:00
committed by GitHub
parent 930a5c3e44
commit 6b67c82b94
12 changed files with 95 additions and 38 deletions

View File

@@ -39,8 +39,15 @@ for f in *.bin; do
done
done
# Test round-tripping '-r' with '-c #none'
reverse_cmd="$RGBGFX -c#none,#fff,#000 -o none_round_trip.2bpp -r 1 out.png"
reconvert_cmd="$RGBGFX -c#none,#fff,#000 -o result.2bpp out.png"
compare_cmd="cmp none_round_trip.2bpp result.2bpp"
new_test "$reverse_cmd && $reconvert_cmd && $compare_cmd"
test || fail $?
# Remove temporaries (also ignored by Git) created by the above tests
rm -f out*.png result.png
rm -f out*.png result.png result.2bpp
for f in *.png; do
flags="$([[ -e "${f%.png}.flags" ]] && echo "@${f%.png}.flags")"