]> git.draconx.ca Git - upkg.git/blob - tests/engine-pcx-rlencode.sh
Improve GOB rebuild rules for VPATH builds.
[upkg.git] / tests / engine-pcx-rlencode.sh
1 #!/bin/sh
2 #
3 # Check corner cases of the PCX run-length encoder.
4 # Copyright © 2012 Nick Bowler
5 #
6 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
7 # This is free software: you are free to do what the fuck you want to.
8 # There is NO WARRANTY, to the extent permitted by law.
9
10 pcxrle=test/pcxrle$EXEEXT
11
12 $pcxrle 00   || exit 1
13 $pcxrle 0000 || exit 1
14 $pcxrle c100 || exit 1
15
16 # Test RLE rollover
17 t1=00
18 t2=$t1$t1
19 t4=$t2$t2
20 t8=$t4$t4
21 t16=$t8$t8
22 t32=$t16$t16
23 t64=$t32$t32
24
25 $pcxrle "$t32$t16$t8$t4$t2$t1" || exit 1 # maximum possible run
26 $pcxrle "$t64" || exit 1
27 $pcxrle "$t64$t64$t64" || exit 1