4 # testone.sh - execute a single testcase
6 # (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
7 # See tidy.c for the copyright notice.
9 # <URL:http://www.html-tidy.org/>
22 TIDY=../build/cmake/tidy5
23 if [ ! -f "$TIDY" ]; then
24 echo "$BN: Can NOT locate binary '$TIDY'!"
25 echo "$BN: Fix me with the correct location of the binary to run."
28 INFILES=./input/in_${TESTNO}.*ml
29 CFGFILE=./input/cfg_${TESTNO}.txt
31 TIDYFILE=./tmp/out_${TESTNO}.html
32 MSGFILE=./tmp/msg_${TESTNO}.txt
39 # Remove any pre-exising test outputs
40 for INFIL in $MSGFILE $TIDYFILE
48 for INFILE in $INFILES
56 # If no test specific config file, use default.
59 CFGFILE=./input/cfg_default.txt
62 # Make sure output directory exists.
68 echo "Doing: './$TIDY -f $MSGFILE -config $CFGFILE "$@" --tidy-mark no -o $TIDYFILE $INFILE'" >> tempall.txt
69 ./$TIDY -f $MSGFILE -config $CFGFILE "$@" --tidy-mark no -o $TIDYFILE $INFILE
72 if [ $STATUS -ne $EXPECTED ]
74 echo "== $TESTNO failed (Status received: $STATUS vs expected: $EXPECTED)"
76 echo "== $TESTNO failed (Status received: $STATUS vs expected: $EXPECTED)" >> tempall.txt
77 cat $MSGFILE >> tempall.txt