diff options
Diffstat (limited to 'Build/source/texk/web2c/triptrap/trip.diffs')
-rw-r--r-- | Build/source/texk/web2c/triptrap/trip.diffs | 168 |
1 files changed, 147 insertions, 21 deletions
diff --git a/Build/source/texk/web2c/triptrap/trip.diffs b/Build/source/texk/web2c/triptrap/trip.diffs index 639ff619a6c..7d9c024aa24 100644 --- a/Build/source/texk/web2c/triptrap/trip.diffs +++ b/Build/source/texk/web2c/triptrap/trip.diffs @@ -1,45 +1,150 @@ +#! /bin/sh -vx +# $Id: triptest.test 53154 2019-12-17 19:06:20Z karl $ +# Copyright 2017-2021 Karl Berry <tex-live@tug.org> +# Copyright 2009-2014 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE ++ LC_ALL=C ++ export LC_ALL ++ LANGUAGE=C ++ export LANGUAGE + +testdir=$abs_srcdir/triptrap ++ testdir=SRCDIR/triptrap +TEXMFCNF=$testdir; export TEXMFCNF ++ TEXMFCNF=SRCDIR/triptrap ++ export TEXMFCNF + +rm -rf tripdir ++ rm -rf tripdir +mkdir tripdir ++ mkdir tripdir +cd tripdir ++ cd tripdir +mkdir a b ++ mkdir a b + +# See triptrap/README for explanation of why we believe these diffs are ok. + +# TeX Live generic +cat >filter <<-\_EOF + s,^\*\*(\./trip\.tex ##,** \&trip trip \ + (trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/(preloaded format=tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + 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 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/TeX output ....\...\...:.../TeX output YYYY.MM.DD:hhmm/ + _EOF ++ cat + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342../down4 639342208/ + s/y4 2039217./y4 203921760/ + s/y0 2039217./y0 203921760/ + _EOF ++ cat + +dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" ++ dvitype_args='-output-level=2 -dpi=72.27 -page-start='\''*.*.*.*.*.*.*.*.*.*'\''' + +echo ">>> Running TRIP test for TeX." >&2 ++ echo '>>> Running TRIP test for TeX.' >>> Running TRIP test for TeX. +echo ">>> See $testdir/trip.diffs for example of acceptable diffs." >&2 ++ echo '>>> See SRCDIR/triptrap/trip.diffs for example of acceptable diffs.' >>> See SRCDIR/triptrap/trip.diffs for example of acceptable diffs. + +is_OK=: ++ is_OK=: + +set -x ++ set -x + +./pltotf $testdir/trip.pl trip.tfm || exit 1 + ./pltotf SRCDIR/triptrap/trip.pl trip.tfm + +./tftopl ./trip.tfm trip.pl || exit 1 + ./tftopl ./trip.tfm trip.pl + +diff $testdir/trip.pl trip.pl || is_OK=false + diff SRCDIR/triptrap/trip.pl trip.pl + +# get same filename in log +rm -f trip.tex ++ rm -f trip.tex +$LN_S $testdir/trip.tex . || exit 1 + ln -s SRCDIR/triptrap/trip.tex . + +rm -f trip.fmt ++ rm -f trip.fmt +./tex --progname=initex --ini <$testdir/trip1.in >tripin.fot + ./tex --progname=initex --ini +if test ! -s trip.fmt; then + echo "*** trip.fmt not created by trip1.in, investigate!" >&2 + exit 1 +fi + test '!' -s trip.fmt +mv trip.log tripin.log || exit 1 + mv trip.log tripin.log +diff $testdir/tripin.log tripin.log + diff SRCDIR/triptrap/tripin.log tripin.log 1c1 -< This is TeX, Version 3.14159265 (INITEX) 7 JAN 2014 09:09 +< This is TeX, Version 3.141592653 (INITEX) 4 JUL 1776 12:00 --- -> This is TeX, Version 3.14159265 (TeX Live 2015) (INITEX) 12 APR 2015 16:22 +> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (INITEX) 27 JAN 2021 18:03 3c3 < (trip.tex --- > (./trip.tex 450,451c450,451 -< (preloaded format=trip 2014.1.7) -< 1326 strings of total length 23646 +< (preloaded format=trip 1776.7.4) +< 1326 strings of total length 23633 --- -> (preloaded format=trip 2015.4.12) -> 1371 strings of total length 24606 +> (preloaded format=trip 2021.1.27) +> 1372 strings of total length 24645 461c461 < Hyphenation trie of length 273 has 9 ops out of 500 --- > Hyphenation trie of length 273 has 9 ops out of 35111 + +# May as well test non-ini second time through. +./tex --progname=tex <$testdir/trip2.in >trip.fot + ./tex --progname=tex +diff $testdir/trip.fot trip.fot + diff SRCDIR/triptrap/trip.fot trip.fot 1,3c1,2 -< This is TeX, Version 3.14159265 (INITEX) +< This is TeX, Version 3.141592653 (INITEX) < ** &trip trip < (trip.tex ## --- -> This is TeX, Version 3.14159265 (TeX Live 2015) (preloaded format=tex) +> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (preloaded format=tex) > **(./trip.tex ## + +# We use $DIFF instead of `diff' only for those files where there +# might actually be legitimate numerical differences. +$DIFF $DIFFFLAGS $testdir/trip.log trip.log + diff SRCDIR/triptrap/trip.log trip.log 1c1 -< This is TeX, Version 3.14159265 (preloaded format=trip 2014.1.7) 7 JAN 2014 09:59 +< This is TeX, Version 3.141592653 (preloaded format=trip 1776.7.4) 4 JUL 1776 12:00 --- -> This is TeX, Version 3.14159265 (TeX Live 2015) (preloaded format=trip 2015.4.12) 12 APR 2015 16:22 +> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (preloaded format=trip 2021.1.27) 27 JAN 2021 18:03 3c3 < (trip.tex ## --- @@ -80,35 +185,42 @@ < \vbox(16383.99998+0.0)x205.12613, glue set 16344.0fil --- > \vbox(16383.99998+0.0)x205.12613, glue set 16343.99998fil -6380c6380 +6381c6381 < (tripos.tex --- > (./tripos.tex -7296,7297c7296,7297 +7297,7298c7297,7298 < 47 strings out of 1674 -< 253 string characters out of 8354 +< 253 string characters out of 8367 --- -> 44 strings out of 1629 -> 261 string characters out of 15395 -7299c7299 +> 44 strings out of 1628 +> 261 string characters out of 15355 +7300c7300 < 372 multiletter control sequences out of 2100 --- > 372 multiletter control sequences out of 15000+0 -7301c7301 +7302c7302 < 2 hyphenation exceptions out of 307 --- > 1 hyphenation exception out of 659 + +diff $testdir/tripos.tex tripos.tex || is_OK=false ++ diff SRCDIR/triptrap/tripos.tex tripos.tex + +eval ./dvitype $dvitype_args trip.dvi >trip.typ || exit 1 + eval ./dvitype -output-level=2 -dpi=72.27 '-page-start='\''*.*.*.*.*.*.*.*.*.*'\''' trip.dvi +./dvitype -output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*' trip.dvi ++ ./dvitype -output-level=2 -dpi=72.27 '-page-start=*.*.*.*.*.*.*.*.*.*' trip.dvi +$DIFF $DIFFFLAGS $testdir/trip.typ trip.typ + diff SRCDIR/triptrap/trip.typ trip.typ 1c1 < This is DVItype, Version 3.6 --- -> This is DVItype, Version 3.6 (TeX Live 2015) +> This is DVItype, Version 3.6 (TeX Live 2021/dev) 9c9 -< ' TeX output 2014.01.07:0959' +< ' TeX output 1776.07.04:1200' --- -> ' TeX output 2015.04.12:1622' +> ' TeX output 2021.01.27:1803' 419c419 < 1121: down4 639342208 --- @@ -119,6 +231,12 @@ --- > 2535: y4 203921756 > 2540: y0 203921756 + +for f in tripin.log trip.fot trip.log trip.typ; do + sed $testdir/$f -f filter >a/$f + sed $f -f filter >b/$f + diff a/$f b/$f || is_OK=false +done + for f in tripin.log trip.fot trip.log trip.typ + sed SRCDIR/triptrap/tripin.log -f filter + sed tripin.log -f filter @@ -135,7 +253,15 @@ + sed SRCDIR/triptrap/trip.typ -f filter + sed trip.typ -f filter + diff a/trip.typ b/trip.typ + +$is_OK && { + echo ">>> All differences are acceptable." >&2 +} || { + echo "*** Error(s) found in trip test, investigate!" >&2 + exit 1 +} + : + echo '>>> All differences are acceptable.' >>> All differences are acceptable. -PASS: triptest +PASS triptest.test (exit status: 0) +PASS: triptest.test |