summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir/mptrap.test
blob: 86203400491a883afc51ccb54171eb7afef02f89 (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
38
39
#! /bin/sh

testdir=$abs_srcdir/triptrap

TEXMFCNF=$testdir; export TEXMFCNF

rm -rf mptrapdir
mkdir mptrapdir
cd mptrapdir

dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'"

echo ">>> Running MPTRAP test for MetaPost." >&2
echo ">>> See $testdir/mptrap.diffs for example of acceptable diffs." >&2

set -x

../pltotf $testdir/trapf.pl trapf.tfm

# get same filename in log
$LN_S $testdir/mtrap.mp . || exit 1

../mpost --ini mtrap
diff $testdir/mtrap.log mtrap.log
diff $testdir/mtrap.0 mtrap.0
diff $testdir/mtrap.1 mtrap.1
diff $testdir/writeo writeo
diff $testdir/writeo.2 writeo.2

$LN_S $testdir/trap.mp . || exit 1
$LN_S $testdir/trap.mpx . || exit 1

## Why is --jobname required? And why --ini?
../mpost --ini --jobname=trap <$testdir/mptrap1.in >mptrapin.fot
mv trap.log mptrapin.log || exit 1
diff $testdir/mptrapin.log mptrapin.log

exit 0