summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-20 07:31:37 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-20 07:31:37 +0000
commit822e7e612de859b23a6aa03e2ce575696afd84c6 (patch)
tree5b9eb927071f472b139815623ad0e071f42a0343 /Build/source
parent12a29dfae1b841e3ab57da46e1d53b55ed0c5d76 (diff)
Metafont: Stricter checking in mftraptest
git-svn-id: svn://tug.org/texlive/trunk@32726 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rwxr-xr-xBuild/source/texk/web2c/mftraptest36
-rwxr-xr-xBuild/source/texk/web2c/triptest6
3 files changed, 39 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index a18132c1036..afc9cfcd790 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mftraptest: Stricter checking.
+
2014-01-18 Peter Breitenlohner <peb@mppmu.mpg.de>
* triptest: Stricter checking.
diff --git a/Build/source/texk/web2c/mftraptest b/Build/source/texk/web2c/mftraptest
index 5b1498f9dbb..bbdd8998b9c 100755
--- a/Build/source/texk/web2c/mftraptest
+++ b/Build/source/texk/web2c/mftraptest
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
testdir=$abs_srcdir/triptrap
@@ -11,11 +11,28 @@ rm -rf trapdir
mkdir trapdir
cd trapdir
-dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'"
+mkdir a b
+cat >filter <<-\_EOF
+ s,^\*\*(trap\.mf,** \&trap trap \
+ (trap.mf,
+ s/ (TeX Live 20[^)]*)//
+ s/base=trap [^)][^)]*)/base=trap)/
+ s/) [0-9A-Z: ]*$/)/
+ s/usage [1-9][0-9&]* ([1-9][0-9&]* still/usage XX\&XX (YYY\&YYYYY still/
+ s/[1-9][0-9]* strings of total length [1-9][0-9]*/XXXX strings of total length YYYYY/
+ s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/
+ s/[1-9][0-9]* string characters out of [1-9].*/XXXX string characters out of YYYYY/
+ s/tokens out of [1-9][0-9]*/tokens out of YYYY/
+ s/out of [1-9][0-9]*i,[0-9nrpb,]*/out of YYi,YYYn,YYYr,YYYp,YYYb/
+ s/out of [1-9][0-9]*w,[0-9hdilkep,]*)/out of YYYw,YYh,YYd,YYi,YYYYl,YYYk,YYYe,YYp)/
+ s/METAFONT output 20..\...\...:..../METAFONT output 20YY.MM.DD:hhmm/
+ _EOF
echo ">>> Running TRAP test for Metafont." >&2
echo ">>> See $testdir/mftrap.diffs for example of acceptable diffs." >&2
+is_OK=:
+
set -x
# get same filename in log
@@ -32,10 +49,21 @@ diff $testdir/mftrap.fot mftrap.fot
diff $testdir/mftrap.log mftrap.log
../tftopl ./mftrap.tfm mftrap.pl || exit 1
-diff $testdir/mftrap.pl mftrap.pl
+diff $testdir/mftrap.pl mftrap.pl || is_OK=false
../gftype -m -i ./trap.72270gf >trap.typ || exit 1
diff $testdir/trap.typ trap.typ
-exit 0
+for f in mftrapin.log mftrap.fot mftrap.log trap.typ; do
+ sed $testdir/$f -f filter >a/$f
+ sed $f -f filter >b/$f
+ diff a/$f b/$f || is_OK=false
+done
+
+$is_OK && {
+ echo ">>> All differences are acceptable." >&2
+} || {
+ echo ">>> There were some errors." >&2
+ exit 1
+}
diff --git a/Build/source/texk/web2c/triptest b/Build/source/texk/web2c/triptest
index bbb8b777085..cd786c81263 100755
--- a/Build/source/texk/web2c/triptest
+++ b/Build/source/texk/web2c/triptest
@@ -21,9 +21,9 @@ cat >filter <<-\_EOF
s/) [0-9A-Z: ]*$/)/
s,^(\./,(,
s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/
- s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of XYYY/
- s/sequences out of [1-9].*/sequences out of XYYY/
- s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of XYY/
+ s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/
+ s/sequences out of [1-9].*/sequences out of YYYY/
+ s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/
s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/
s/9 ops out of [1-9][0-9]*/9 ops out of YYY/
s/ 16341\.999.*fil/ 16342.0fil/