summaryrefslogtreecommitdiff
path: root/Build/source/utils/pmx/pmx-src/pmx.test
blob: adba6cfab8989196c87b3da4bbeb1d42187ac8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/sh

# Copyright (C) 2021 Bob Tennent <rdt@cs.queensu.ca>
# You may freely use, modify and/or distribute this file.

rm -f barsant* pmxaerr.dat
if test -r "$srcdir/tests/barsant.pmx"; then
  : # standalone pmx
elif test -r "$srcdir/pmx-src/tests/barsant.pmx"; then
  srcdir=$srcdir/pmx-src # in TL
else
  echo "$0: cannot find tests/barsant.pmx" >&2
  exit 1
fi


cp "$test_src/barsant.pmx" . || exit 1

failed=

./scor2prt barsant \
        && diff barsant1.pmx $test_src/barsant1.pmx \
        && diff barsant2.pmx $test_src/barsant2.pmx \
        || failed="$failed scor2prt"

./pmxab barsant \
        && diff barsant.mid $test_src/barsant.mid \
        && diff barsant.pml $test_src/barsant.pml \
        && diff barsant.tex $test_src/barsant.tex \
        || failed="$failed pmxab"

test -z "$failed" && exit 0
echo "failed tests:$failed"
exit 1