| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: triptest.test 53154 2019-12-17 19:06:20Z karl $ |
| 3 |
# Copyright 2017-2021 Karl Berry <[email protected]> |
| 4 |
# Copyright 2009-2014 Peter Breitenlohner <[email protected]> |
| 5 |
# You may freely use, modify and/or distribute this file. |
| 6 |
|
| 7 |
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE |
| 8 |
+ LC_ALL=C |
| 9 |
+ export LC_ALL |
| 10 |
+ LANGUAGE=C |
| 11 |
+ export LANGUAGE |
| 12 |
|
| 13 |
testdir=$abs_srcdir/triptrap |
| 14 |
+ testdir=SRCDIR/triptrap |
| 15 |
TEXMFCNF=$testdir; export TEXMFCNF |
| 16 |
+ TEXMFCNF=SRCDIR/triptrap |
| 17 |
+ export TEXMFCNF |
| 18 |
|
| 19 |
rm -rf tripdir |
| 20 |
+ rm -rf tripdir |
| 21 |
mkdir tripdir |
| 22 |
+ mkdir tripdir |
| 23 |
cd tripdir |
| 24 |
+ cd tripdir |
| 25 |
mkdir a b |
| 26 |
+ mkdir a b |
| 27 |
|
| 28 |
# See triptrap/README for explanation of why we believe these diffs are ok. |
| 29 |
|
| 30 |
# TeX Live generic |
| 31 |
cat >filter <<-\_EOF |
| 32 |
s,^\*\*(\./trip\.tex ##,** \&trip trip \ |
| 33 |
(trip.tex ##, |
| 34 |
s/ (TeX Live 20[^)]*)// |
| 35 |
s/(preloaded format=tex)/(INITEX)/ |
| 36 |
s/format=trip [^)][^)]*)/format=trip)/ |
| 37 |
s/) [0-9A-Z: ]*$/)/ |
| 38 |
s,^(\./,(, |
| 39 |
s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ |
| 40 |
s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ |
| 41 |
s/sequences out of [1-9].*/sequences out of YYYY/ |
| 42 |
s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ |
| 43 |
s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ |
| 44 |
s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ |
| 45 |
s/TeX output ....\...\...:.../TeX output YYYY.MM.DD:hhmm/ |
| 46 |
_EOF |
| 47 |
+ cat |
| 48 |
|
| 49 |
# x86 glue rounding |
| 50 |
cat >>filter <<-\_EOF |
| 51 |
s/ 16341\.999.*fil/ 16342.0fil/ |
| 52 |
s/ 16238\.999.*fil/ 16239.0fil/ |
| 53 |
s/ 16317\.999.*fil/ 16318.0fil/ |
| 54 |
s/ 16330\.999.*fil/ 16331.0fil/ |
| 55 |
s/ 16331\.999.*fil/ 16332.0fil/ |
| 56 |
s/ 16343\.999.*fil/ 16344.0fil/ |
| 57 |
s/ 9737\.587..fil/ 9737.58789fil/ |
| 58 |
s/down4 639342../down4 639342208/ |
| 59 |
s/y4 2039217./y4 203921760/ |
| 60 |
s/y0 2039217./y0 203921760/ |
| 61 |
_EOF |
| 62 |
+ cat |
| 63 |
|
| 64 |
dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" |
| 65 |
+ dvitype_args='-output-level=2 -dpi=72.27 -page-start='\''*.*.*.*.*.*.*.*.*.*'\''' |
| 66 |
|
| 67 |
echo ">>> Running TRIP test for TeX." >&2 |
| 68 |
+ echo '>>> Running TRIP test for TeX.' |
| 69 |
>>> Running TRIP test for TeX. |
| 70 |
echo ">>> See $testdir/trip.diffs for example of acceptable diffs." >&2 |
| 71 |
+ echo '>>> See SRCDIR/triptrap/trip.diffs for example of acceptable diffs.' |
| 72 |
>>> See SRCDIR/triptrap/trip.diffs for example of acceptable diffs. |
| 73 |
|
| 74 |
is_OK=: |
| 75 |
+ is_OK=: |
| 76 |
|
| 77 |
set -x |
| 78 |
+ set -x |
| 79 |
|
| 80 |
./pltotf $testdir/trip.pl trip.tfm || exit 1 |
| 81 |
+ ./pltotf SRCDIR/triptrap/trip.pl trip.tfm |
| 82 |
|
| 83 |
./tftopl ./trip.tfm trip.pl || exit 1 |
| 84 |
+ ./tftopl ./trip.tfm trip.pl |
| 85 |
|
| 86 |
diff $testdir/trip.pl trip.pl || is_OK=false |
| 87 |
+ diff SRCDIR/triptrap/trip.pl trip.pl |
| 88 |
|
| 89 |
# get same filename in log |
| 90 |
rm -f trip.tex |
| 91 |
+ rm -f trip.tex |
| 92 |
$LN_S $testdir/trip.tex . || exit 1 |
| 93 |
+ ln -s SRCDIR/triptrap/trip.tex . |
| 94 |
|
| 95 |
rm -f trip.fmt |
| 96 |
+ rm -f trip.fmt |
| 97 |
./tex --progname=initex --ini <$testdir/trip1.in >tripin.fot |
| 98 |
+ ./tex --progname=initex --ini |
| 99 |
if test ! -s trip.fmt; then |
| 100 |
echo "*** trip.fmt not created by trip1.in, investigate!" >&2 |
| 101 |
exit 1 |
| 102 |
fi |
| 103 |
+ test '!' -s trip.fmt |
| 104 |
mv trip.log tripin.log || exit 1 |
| 105 |
+ mv trip.log tripin.log |
| 106 |
diff $testdir/tripin.log tripin.log |
| 107 |
+ diff SRCDIR/triptrap/tripin.log tripin.log |
| 108 |
1c1 |
| 109 |
< This is TeX, Version 3.141592653 (INITEX) 4 JUL 1776 12:00 |
| 110 |
--- |
| 111 |
> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (INITEX) 27 JAN 2021 18:03 |
| 112 |
3c3 |
| 113 |
< (trip.tex |
| 114 |
--- |
| 115 |
> (./trip.tex |
| 116 |
450,451c450,451 |
| 117 |
< (preloaded format=trip 1776.7.4) |
| 118 |
< 1326 strings of total length 23633 |
| 119 |
--- |
| 120 |
> (preloaded format=trip 2021.1.27) |
| 121 |
> 1372 strings of total length 24645 |
| 122 |
461c461 |
| 123 |
< Hyphenation trie of length 273 has 9 ops out of 500 |
| 124 |
--- |
| 125 |
> Hyphenation trie of length 273 has 9 ops out of 35111 |
| 126 |
|
| 127 |
# May as well test non-ini second time through. |
| 128 |
./tex --progname=tex <$testdir/trip2.in >trip.fot |
| 129 |
+ ./tex --progname=tex |
| 130 |
diff $testdir/trip.fot trip.fot |
| 131 |
+ diff SRCDIR/triptrap/trip.fot trip.fot |
| 132 |
1,3c1,2 |
| 133 |
< This is TeX, Version 3.141592653 (INITEX) |
| 134 |
< ** &trip trip |
| 135 |
< (trip.tex ## |
| 136 |
--- |
| 137 |
> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (preloaded format=tex) |
| 138 |
> **(./trip.tex ## |
| 139 |
|
| 140 |
# We use $DIFF instead of `diff' only for those files where there |
| 141 |
# might actually be legitimate numerical differences. |
| 142 |
$DIFF $DIFFFLAGS $testdir/trip.log trip.log |
| 143 |
+ diff SRCDIR/triptrap/trip.log trip.log |
| 144 |
1c1 |
| 145 |
< This is TeX, Version 3.141592653 (preloaded format=trip 1776.7.4) 4 JUL 1776 12:00 |
| 146 |
--- |
| 147 |
> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (preloaded format=trip 2021.1.27) 27 JAN 2021 18:03 |
| 148 |
3c3 |
| 149 |
< (trip.tex ## |
| 150 |
--- |
| 151 |
> (./trip.tex ## |
| 152 |
1405c1405 |
| 153 |
< \vbox(16383.99998+0.0)x1000.0, glue set 16342.0fil |
| 154 |
--- |
| 155 |
> \vbox(16383.99998+0.0)x1000.0, glue set 16341.99998fil |
| 156 |
1954c1954 |
| 157 |
< (tripos.tex |
| 158 |
--- |
| 159 |
> (./tripos.tex |
| 160 |
2018c2018 |
| 161 |
< \vbox(16383.99998+1.0)x100.0, glue set 16239.0fil |
| 162 |
--- |
| 163 |
> \vbox(16383.99998+1.0)x100.0, glue set 16238.99998fil |
| 164 |
2533c2533 |
| 165 |
< \vbox(16383.99998+0.0)x20.0, glue set 16331.0fil |
| 166 |
--- |
| 167 |
> \vbox(16383.99998+0.0)x20.0, glue set 16330.99998fil |
| 168 |
3326c3326 |
| 169 |
< \vbox(10000.0+2.0)x28.0, glue set 9737.58789fil |
| 170 |
--- |
| 171 |
> \vbox(10000.0+2.0)x28.0, glue set 9737.58742fil |
| 172 |
3864c3864 |
| 173 |
< \vbox(16383.99998+2.0)x100.0, glue set 16318.0fil |
| 174 |
--- |
| 175 |
> \vbox(16383.99998+2.0)x100.0, glue set 16317.99997fil |
| 176 |
4034c4034 |
| 177 |
< \vbox(16383.99998+0.0)x8236.0, glue set 16344.0fil |
| 178 |
--- |
| 179 |
> \vbox(16383.99998+0.0)x8236.0, glue set 16343.99998fil |
| 180 |
4420c4420 |
| 181 |
< \vbox(16383.99998+0.0)x100.0, glue set 16332.0fil |
| 182 |
--- |
| 183 |
> \vbox(16383.99998+0.0)x100.0, glue set 16331.99998fil |
| 184 |
4742c4742 |
| 185 |
< \vbox(16383.99998+0.0)x205.12613, glue set 16344.0fil |
| 186 |
--- |
| 187 |
> \vbox(16383.99998+0.0)x205.12613, glue set 16343.99998fil |
| 188 |
6381c6381 |
| 189 |
< (tripos.tex |
| 190 |
--- |
| 191 |
> (./tripos.tex |
| 192 |
7297,7298c7297,7298 |
| 193 |
< 47 strings out of 1674 |
| 194 |
< 253 string characters out of 8367 |
| 195 |
--- |
| 196 |
> 44 strings out of 1628 |
| 197 |
> 261 string characters out of 15355 |
| 198 |
7300c7300 |
| 199 |
< 372 multiletter control sequences out of 2100 |
| 200 |
--- |
| 201 |
> 372 multiletter control sequences out of 15000+0 |
| 202 |
7302c7302 |
| 203 |
< 2 hyphenation exceptions out of 307 |
| 204 |
--- |
| 205 |
> 1 hyphenation exception out of 659 |
| 206 |
|
| 207 |
diff $testdir/tripos.tex tripos.tex || is_OK=false |
| 208 |
+ diff SRCDIR/triptrap/tripos.tex tripos.tex |
| 209 |
|
| 210 |
eval ./dvitype $dvitype_args trip.dvi >trip.typ || exit 1 |
| 211 |
+ eval ./dvitype -output-level=2 -dpi=72.27 '-page-start='\''*.*.*.*.*.*.*.*.*.*'\''' trip.dvi |
| 212 |
./dvitype -output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*' trip.dvi |
| 213 |
++ ./dvitype -output-level=2 -dpi=72.27 '-page-start=*.*.*.*.*.*.*.*.*.*' trip.dvi |
| 214 |
$DIFF $DIFFFLAGS $testdir/trip.typ trip.typ |
| 215 |
+ diff SRCDIR/triptrap/trip.typ trip.typ |
| 216 |
1c1 |
| 217 |
< This is DVItype, Version 3.6 |
| 218 |
--- |
| 219 |
> This is DVItype, Version 3.6 (TeX Live 2021/dev) |
| 220 |
9c9 |
| 221 |
< ' TeX output 1776.07.04:1200' |
| 222 |
--- |
| 223 |
> ' TeX output 2021.01.27:1803' |
| 224 |
419c419 |
| 225 |
< 1121: down4 639342208 |
| 226 |
--- |
| 227 |
> 1121: down4 639342177 |
| 228 |
1087,1088c1087,1088 |
| 229 |
< 2535: y4 203921760 |
| 230 |
< 2540: y0 203921760 |
| 231 |
--- |
| 232 |
> 2535: y4 203921756 |
| 233 |
> 2540: y0 203921756 |
| 234 |
|
| 235 |
for f in tripin.log trip.fot trip.log trip.typ; do |
| 236 |
sed $testdir/$f -f filter >a/$f |
| 237 |
sed $f -f filter >b/$f |
| 238 |
diff a/$f b/$f || is_OK=false |
| 239 |
done |
| 240 |
+ for f in tripin.log trip.fot trip.log trip.typ |
| 241 |
+ sed SRCDIR/triptrap/tripin.log -f filter |
| 242 |
+ sed tripin.log -f filter |
| 243 |
+ diff a/tripin.log b/tripin.log |
| 244 |
+ for f in tripin.log trip.fot trip.log trip.typ |
| 245 |
+ sed SRCDIR/triptrap/trip.fot -f filter |
| 246 |
+ sed trip.fot -f filter |
| 247 |
+ diff a/trip.fot b/trip.fot |
| 248 |
+ for f in tripin.log trip.fot trip.log trip.typ |
| 249 |
+ sed SRCDIR/triptrap/trip.log -f filter |
| 250 |
+ sed trip.log -f filter |
| 251 |
+ diff a/trip.log b/trip.log |
| 252 |
+ for f in tripin.log trip.fot trip.log trip.typ |
| 253 |
+ sed SRCDIR/triptrap/trip.typ -f filter |
| 254 |
+ sed trip.typ -f filter |
| 255 |
+ diff a/trip.typ b/trip.typ |
| 256 |
|
| 257 |
$is_OK && { |
| 258 |
echo ">>> All differences are acceptable." >&2 |
| 259 |
} || { |
| 260 |
echo "*** Error(s) found in trip test, investigate!" >&2 |
| 261 |
exit 1 |
| 262 |
} |
| 263 |
+ : |
| 264 |
+ echo '>>> All differences are acceptable.' |
| 265 |
>>> All differences are acceptable. |
| 266 |
PASS triptest.test (exit status: 0) |
| 267 |
PASS: triptest.test |