diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-05-13 12:29:21 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-05-13 12:29:21 +0000 |
commit | 8731675b6dfc522aa19d4192021b991dacf66326 (patch) | |
tree | 5aa7e13a5c39d322e68ce1e75a299cc0b78f2107 /Build/source/texk/web2c/mplibdir | |
parent | c4d9d37c45b7531dd2e9df292a3cfe3090b3c537 (diff) |
add MPTRAP test for MetaPost -- pleliminary
git-svn-id: svn://tug.org/texlive/trunk@13074 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir')
-rw-r--r-- | Build/source/texk/web2c/mplibdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/mplibdir/am/mplib.am | 25 | ||||
-rwxr-xr-x | Build/source/texk/web2c/mplibdir/mptrap.test | 68 |
3 files changed, 98 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog index 6c4997a752f..e0c3e650895 100644 --- a/Build/source/texk/web2c/mplibdir/ChangeLog +++ b/Build/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,8 @@ +2009-05-13 Peter Breitenlohner <peb@mppmu.mpg.de> + + * mptrap.test (new): Shell script for MPTRAP test. + * am/mplib.am: Added MPTRAP test. + 2009-05-11 Taco Hoekwater <taco@elvenkind.com> * Released version of MPLib 1.200 diff --git a/Build/source/texk/web2c/mplibdir/am/mplib.am b/Build/source/texk/web2c/mplibdir/am/mplib.am index fe9c89bfd72..cc5fa19e19f 100644 --- a/Build/source/texk/web2c/mplibdir/am/mplib.am +++ b/Build/source/texk/web2c/mplibdir/am/mplib.am @@ -38,3 +38,28 @@ EXTRA_DIST += mplibdir/ChangeLog $(mpost_web) DISTCLEANFILES += $(nodist_mpost_SOURCES) mpxout-ctangle +## MetaPost Tests +## +mp_tests = mplibdir/mptrap.test + +EXTRA_DIST += $(mp_tests) + +if MP +TESTS += $(mp_tests) +check_PROGRAMS += pltotf tftopl +endif MP + +.PHONY: mptrap-clean +clean-local:: mptrap-clean +## mptrap.test +mptrap-clean: + rm -f mtrap.mp mtrap.mem trapf.tfm + rm -f mtrap.log mtrap.0 mtrap.1 writeo writeo.log writeo.2 + rm -f trap.mp trap.mpx mptrapin.fot mptrapin.log + rm -f mptrap.fot mptrap.log mptrap.tfm + rm -f trap.ps trap.mem trap.0 trap.5 trap.6 trap.95 trap.96 trap.97 + rm -f trap.98 trap.99 trap.100 trap.101 trap.102 trap.103 trap.104 + rm -f trap.105 trap.106 trap.107 trap.108 trap.109 trap.148 + rm -f trap.149 trap.150 trap.151 trap.197 trap.200 + rm -f mptrap.pl + diff --git a/Build/source/texk/web2c/mplibdir/mptrap.test b/Build/source/texk/web2c/mplibdir/mptrap.test new file mode 100755 index 00000000000..20bf2cd0d8d --- /dev/null +++ b/Build/source/texk/web2c/mplibdir/mptrap.test @@ -0,0 +1,68 @@ +#! /bin/sh + +testdir=$srcdir/triptrap + +TEXMFCNF=$testdir; export TEXMFCNF + +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 + +rm -f mtrap.mp mtrap.mem trapf.tfm +rm -f mtrap.log mtrap.0 mtrap.1 writeo writeo.log writeo.2 +rm -f trap.mp trap.mpx mptrapin.fot mptrapin.log +rm -f mptrap.fot mptrap.log mptrap.tfm +rm -f trap.ps trap.mem trap.0 trap.5 trap.6 trap.95 trap.96 trap.97 +rm -f trap.98 trap.99 trap.100 trap.101 trap.102 trap.103 trap.104 +rm -f trap.105 trap.106 trap.107 trap.108 trap.109 trap.148 +rm -f trap.149 trap.150 trap.151 trap.197 trap.200 +rm -f mptrap.pl + +set -x + +./pltotf $testdir/trapf.pl trapf.tfm + +# get same filename in log +$LN_S $testdir/mtrap.mp . || exit 1 + +./mpost --progname=inimpost --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 --progname=inimpost --jobname=trap --ini <$testdir/mptrap1.in >mptrapin.fot +mv trap.log mptrapin.log || exit 1 +diff $testdir/mptrapin.log mptrapin.log + +# Must run inimpost or font_name[null_font] is not initialized, leading to diffs. +./mpost --progname=inimpost --jobname=trap <$testdir/mptrap2.in >mptrap.fot + +## Here the test fails, but we just exit or 'make distcheck' would fail + +echo "WARNING: $0 failed"; exit 0 + +mv trap.log mptrap.log || exit 1 +mv trap.tfm mptrap.tfm || exit 1 +diff $testdir/mptrap.fot mptrap.fot +diff $testdir/mptrap.log mptrap.log +diff $testdir/trap.5 trap.5 +diff $testdir/trap.6 trap.6 +diff $testdir/trap.148 trap.148 +diff $testdir/trap.149 trap.149 +diff $testdir/trap.150 trap.150 +diff $testdir/trap.151 trap.151 +diff $testdir/trap.197 trap.197 +diff $testdir/trap.200 trap.200 + +./tftopl ./mptrap.tfm mptrap.pl || exit 1 +diff $testdir/mptrap.pl mptrap.pl + +exit 0 + |