Debian Codegraph @

utils/pmx/pmx-src/pmx.test

raw
1 #! /bin/sh
2
3 # Copyright (C) 2021 Bob Tennent <[email protected]>
4 # You may freely use, modify and/or distribute this file.
5
6 rm -f barsant* pmxaerr.dat
7 if test -r "$srcdir/tests/barsant.pmx"; then
8 : # standalone pmx
9 elif test -r "$srcdir/pmx-src/tests/barsant.pmx"; then
10 srcdir=$srcdir/pmx-src # in TL
11 else
12 echo "$0: cannot find tests/barsant.pmx" >&2
13 exit 1
14 fi
15
16
17 cp "$test_src/barsant.pmx" . || exit 1
18
19 failed=
20
21 ./scor2prt barsant \
22 && diff barsant1.pmx $test_src/barsant1.pmx \
23 && diff barsant2.pmx $test_src/barsant2.pmx \
24 || failed="$failed scor2prt"
25
26 ./pmxab barsant \
27 && diff barsant.mid $test_src/barsant.mid \
28 && diff barsant.pml $test_src/barsant.pml \
29 && diff barsant.tex $test_src/barsant.tex \
30 || failed="$failed pmxab"
31
32 test -z "$failed" && exit 0
33 echo "failed tests:$failed"
34 exit 1
35