summaryrefslogtreecommitdiff
path: root/Build/source/texk/musixtnt/musixtnt-2015-02-09/fixmsxpart.test
blob: 0f9dc8a0936a3ea408998187f2588d12ec9ef694 (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
36
37
#! /bin/sh

# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

echo && echo "*** fixmsxpart --help"
./fixmsxpart --help || exit 1

echo && echo "*** fixmsxpart --version"
./fixmsxpart --version || exit 1

echo && echo "*** fixmsxpart -dd (missing infile)"
./fixmsxpart -dd && exit 1

echo && echo "*** fixmsxpart too many args"
./fixmsxpart too many args && exit 1

: ${testsrc:=$srcdir/tests}

echo && echo "*** generate fixtest.exp with version and date"
yyyymmdd=`date +%F`
version=`./fixmsxpart -v | sed 's/^This .* version \(.*\).$/\1/'`
{ echo "% Generated on $yyyymmdd by fixmsxpart ($version)."
  cat $testsrc/fixtest.out; } >fixtest.exp

echo && echo "*** fixmsxpart tests/fixtest fixtest"
./fixmsxpart $testsrc/fixtest fixtest || exit 1

echo && echo "*** diff fixtest.exp fixtest.tex"
diff fixtest.exp fixtest.tex || exit 1

echo && echo "*** fixmsxpart tests/fixtest >fixtest.out"
./fixmsxpart $testsrc/fixtest >fixtest.out || exit 1

echo && echo "*** diff fixtest.exp fixtest.out"
diff fixtest.exp fixtest.out || exit 1