File: runtests.sh

package info (click to toggle)
haskell-texmath 0.3.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 400 kB
  • ctags: 2
  • sloc: haskell: 933; sh: 14; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 591 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# Note: this should be run from within the tests directory
# Make sure you've set the 'test' flag using Cabal:
# cabal install -ftest
# Otherwise the test program won't be built.
# Exit status is number of failed tests.
TESTPROG=../dist/build/testTeXMathML/testTeXMathML
failures=0
for t in *.tex; do
    $TESTPROG <$t >tmp
    diff ${t%.tex}.xhtml tmp >tmpdiff
    if [ "$?" -ne "0" ]; then
        echo "Test ${t%.tex} FAILED (< expected, > actual):"
        cat tmpdiff
        let "failures=$failures+1"
    else
        echo "Test ${t%.tex} PASSED"
    fi
done
exit $failures