Doc: Minor corrections
[shapes.git] / test / graphics / testTEMPLATE
blob805ac27cd63ba0476221af606c62755b13aa6df4
1 #!/bin/sh
3 # This file is part of Shapes.
5 # Shapes is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # any later version.
10 # Shapes is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Shapes. If not, see <http://www.gnu.org/licenses/>.
18 # Copyright 2008 Gustaf Hendeby
20 if test "X${srcdir}" = "X"
21 then
22 srcdir="."
25 OUTPUT=out/FNAME.pdf
26 LOG=FNAME.log
27 CORRECT=${srcdir}/FNAME.correct*.pdf
29 case "$COMPARE" in
30 yes|'')
31 result=1
32 for corr in ${CORRECT}
34 if test "$(compare -density 150 -metric AE \
35 ${corr} ${OUTPUT} /dev/null 2>&1)" -eq 0
36 then
37 result=0
39 done
42 test -f ${OUTPUT} -a ! -f out/FNAME.error
43 result=$?
45 esac
47 cat > ${LOG} <<EOF
48 *** $0 ***
50 Expected output : ${CORRECT}
51 Output : ${OUTPUT}
52 EOF
54 if test $result -ne 0
55 then
56 cat >> $LOG <<EOF
57 Result : FAIL
58 ---
59 EOF
60 case "$COMPARE" in
61 yes|'')
62 for corr in ${CORRECT}
64 compare -verbose -density 150 \
65 ${corr} ${OUTPUT} /dev/null >> $LOG 2>&1
66 done
68 esac
69 else
70 cat >> $LOG <<EOF
71 Result : PASS
72 EOF
75 if test $# -gt 0 && test "$1" -gt 0
76 then
77 cat $LOG
80 exit $result