summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/triptrap/trip.diffs
blob: 7d9c024aa24a8d6b70093c316e4f63b61141fa44 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#! /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.141592653 (INITEX)  4 JUL 1776 12:00
---
> 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 1776.7.4)
< 1326 strings of total length 23633
---
>  (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.141592653 (INITEX)
< ** &trip  trip 
< (trip.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.141592653 (preloaded format=trip 1776.7.4)  4 JUL 1776 12:00
---
> This is TeX, Version 3.141592653 (TeX Live 2021/dev) (preloaded format=trip 2021.1.27)  27 JAN 2021 18:03
3c3
< (trip.tex ##
---
> (./trip.tex ##
1405c1405
< \vbox(16383.99998+0.0)x1000.0, glue set 16342.0fil
---
> \vbox(16383.99998+0.0)x1000.0, glue set 16341.99998fil
1954c1954
< (tripos.tex
---
> (./tripos.tex
2018c2018
< \vbox(16383.99998+1.0)x100.0, glue set 16239.0fil
---
> \vbox(16383.99998+1.0)x100.0, glue set 16238.99998fil
2533c2533
< \vbox(16383.99998+0.0)x20.0, glue set 16331.0fil
---
> \vbox(16383.99998+0.0)x20.0, glue set 16330.99998fil
3326c3326
< \vbox(10000.0+2.0)x28.0, glue set 9737.58789fil
---
> \vbox(10000.0+2.0)x28.0, glue set 9737.58742fil
3864c3864
< \vbox(16383.99998+2.0)x100.0, glue set 16318.0fil
---
> \vbox(16383.99998+2.0)x100.0, glue set 16317.99997fil
4034c4034
< \vbox(16383.99998+0.0)x8236.0, glue set 16344.0fil
---
> \vbox(16383.99998+0.0)x8236.0, glue set 16343.99998fil
4420c4420
< \vbox(16383.99998+0.0)x100.0, glue set 16332.0fil
---
> \vbox(16383.99998+0.0)x100.0, glue set 16331.99998fil
4742c4742
< \vbox(16383.99998+0.0)x205.12613, glue set 16344.0fil
---
> \vbox(16383.99998+0.0)x205.12613, glue set 16343.99998fil
6381c6381
< (tripos.tex
---
> (./tripos.tex
7297,7298c7297,7298
<  47 strings out of 1674
<  253 string characters out of 8367
---
>  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
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 2021/dev)
9c9
< ' TeX output 1776.07.04:1200'
---
> ' TeX output 2021.01.27:1803'
419c419
< 1121: down4 639342208 
---
> 1121: down4 639342177 
1087,1088c1087,1088
< 2535: y4 203921760 
< 2540: y0 203921760 
---
> 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
+ diff a/tripin.log b/tripin.log
+ for f in tripin.log trip.fot trip.log trip.typ
+ sed SRCDIR/triptrap/trip.fot -f filter
+ sed trip.fot -f filter
+ diff a/trip.fot b/trip.fot
+ for f in tripin.log trip.fot trip.log trip.typ
+ sed SRCDIR/triptrap/trip.log -f filter
+ sed trip.log -f filter
+ diff a/trip.log b/trip.log
+ for f in tripin.log trip.fot trip.log trip.typ
+ 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.test (exit status: 0)
PASS: triptest.test