Skip to content

Commit

Permalink
web2c: Make easier to test on Windows
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@68304 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
t-tk committed Sep 17, 2023
1 parent 9c340eb commit a2cfae4
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 28 deletions.
5 changes: 5 additions & 0 deletions texk/web2c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-09-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* {mftraptest,triptest,twill}.test:
Make easier to test on Windows.

2023-09-04 Andreas Scherer <https://ascherer.github.io>

* tangle.ch: Fix typo as in weave.web.
Expand Down
5 changes: 5 additions & 0 deletions texk/web2c/etexdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-09-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* {etriptest,wprob}.test:
Make easier to test on Windows.

2023-03-09 Karl Berry <karl@tug.org>

* TL'23 release.
Expand Down
33 changes: 20 additions & 13 deletions texk/web2c/etexdir/etriptest.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
# Copyright 2009-2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

W2CDir=${W2CDir:-..}
ExeExt=${ExeExt:-}
_etex=$W2CDir/etex$ExeExt
_pltotf=$W2CDir/pltotf$ExeExt
_tftopl=$W2CDir/tftopl$ExeExt
_dvitype=$W2CDir/dvitype$ExeExt

testdir=$abs_srcdir/triptrap
etestdir=$abs_srcdir/etexdir/etrip

Expand All @@ -24,16 +31,16 @@ set -x

echo "*** TRIP test for e-TeX in compatibility mode ***."

../pltotf $testdir/trip.pl trip.tfm || exit 1
$_pltotf $testdir/trip.pl trip.tfm || exit 1

../tftopl ./trip.tfm trip.pl || exit 1
$_tftopl ./trip.tfm trip.pl || exit 1

diff $testdir/trip.pl trip.pl || is_OK=false

# get same filename in log
$LN_S $testdir/trip.tex .

../etex --progname=einitex --ini <$testdir/trip1.in >ctripin.fot
$_etex --progname=einitex --ini <$testdir/trip1.in >ctripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by trip1.in, investigate!" >&2
exit 1
Expand All @@ -42,7 +49,7 @@ mv trip.log ctripin.log || exit 1
diff $testdir/tripin.log ctripin.log

# May as well test non-ini second time through.
../etex --progname=etex <$testdir/trip2.in >ctrip.fot
$_etex --progname=etex <$testdir/trip2.in >ctrip.fot
mv trip.log ctrip.log
diff $testdir/trip.fot ctrip.fot

Expand All @@ -53,7 +60,7 @@ $DIFF $DIFFFLAGS $testdir/trip.log ctrip.log
mv tripos.tex ctripos.tex
diff $testdir/tripos.tex ctripos.tex

eval ../dvitype $dvitype_args trip.dvi >ctrip.typ || exit 1
eval $_dvitype $dvitype_args trip.dvi >ctrip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ ctrip.typ

mv trip.fmt ctrip.fmt
Expand All @@ -62,7 +69,7 @@ mv trip.fmt ctrip.fmt

echo "*** TRIP test for e-TeX in extended mode ***."

../etex --progname=einitex --ini <$etestdir/etrip1.in >xtripin.fot
$_etex --progname=einitex --ini <$etestdir/etrip1.in >xtripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by etrip1.in, investigate!" >&2
exit 1
Expand All @@ -71,7 +78,7 @@ mv trip.log xtripin.log || exit 1
diff ctripin.log xtripin.log

# May as well test non-ini second time through.
../etex --progname=etex <$etestdir/trip2.in >xtrip.fot
$_etex --progname=etex <$etestdir/trip2.in >xtrip.fot
mv trip.log xtrip.log
diff ctrip.fot xtrip.fot

Expand All @@ -82,7 +89,7 @@ $DIFF $DIFFFLAGS ctrip.log xtrip.log
mv tripos.tex xtripos.tex
diff $testdir/tripos.tex xtripos.tex

eval ../dvitype $dvitype_args trip.dvi >xtrip.typ || exit 1
eval $_dvitype $dvitype_args trip.dvi >xtrip.typ || exit 1
$DIFF $DIFFFLAGS ctrip.typ xtrip.typ

mv trip.fmt xtrip.fmt
Expand All @@ -91,16 +98,16 @@ mv trip.fmt xtrip.fmt

echo "*** e-TeX specific part of e-TRIP test ***."

../pltotf $etestdir/etrip.pl etrip.tfm || exit 1
$_pltotf $etestdir/etrip.pl etrip.tfm || exit 1

../tftopl ./etrip.tfm etrip.pl || exit 1
$_tftopl ./etrip.tfm etrip.pl || exit 1

diff $etestdir/etrip.pl etrip.pl || is_OK=false

# get same filename in log
$LN_S $etestdir/etrip.tex .

../etex --progname=einitex --ini <$etestdir/etrip2.in >etripin.fot
$_etex --progname=einitex --ini <$etestdir/etrip2.in >etripin.fot
if test ! -s etrip.fmt; then
echo "*** etrip.fmt not created by etrip2.in, investigate!" >&2
exit 1
Expand All @@ -109,7 +116,7 @@ mv etrip.log etripin.log || exit 1
diff $etestdir/etripin.log etripin.log

# May as well test non-ini second time through.
../etex --progname=etex <$etestdir/etrip3.in >etrip.fot
$_etex --progname=etex <$etestdir/etrip3.in >etrip.fot
diff $etestdir/etrip.fot etrip.fot

# We use $DIFF instead of `diff' only for those files where there
Expand All @@ -118,7 +125,7 @@ $DIFF $DIFFFLAGS $etestdir/etrip.log etrip.log

diff $etestdir/etrip.out etrip.out

eval ../dvitype $dvitype_args etrip.dvi >etrip.typ || exit 1
eval $_dvitype $dvitype_args etrip.dvi >etrip.typ || exit 1
$DIFF $DIFFFLAGS $etestdir/etrip.typ etrip.typ

$is_OK || {
Expand Down
7 changes: 6 additions & 1 deletion texk/web2c/etexdir/wprob.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
# Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_etex=$BinDir/etex$ExeExt

rm -rf ewprob.*
cp $srcdir/tests/wprob.tex ./ewprob.tex

TEXMFCNF=$srcdir/../kpathsea \
./etex --ini --etex --file-line-error --interaction=nonstopmode ewprob.tex
$_etex --ini --etex --file-line-error --interaction=nonstopmode ewprob.tex

grep '^\./ewprob\.tex:12: Could not open file NoSuchFile\.eps\.$' \
ewprob.log || exit 1

exit 0
14 changes: 10 additions & 4 deletions texk/web2c/mftraptest.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# Copyright 2009-2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

W2CDir=${W2CDir:-..}
ExeExt=${ExeExt:-}
_mf=$W2CDir/mf$ExeExt
_tftopl=$W2CDir/tftopl$ExeExt
_gftype=$W2CDir/gftype$ExeExt

# pre-generated test results in the repository are stored in LF
# but the output might be written in CRLF on some platform.
# if 'diff --strip-trailing-cr' is available, exploit it.
Expand Down Expand Up @@ -62,24 +68,24 @@ rm -f trap.mf
$LN_S $testdir/trap.mf . || exit 1

rm -f trap.base
../mf --progname=inimf <$testdir/mftrap1.in >mftrapin.fot
$_mf --progname=inimf <$testdir/mftrap1.in >mftrapin.fot
if test ! -s trap.base; then
echo "*** trap.base not created by mftrap1.in, investigate!" >&2
exit 1
fi
mv trap.log mftrapin.log || exit 1
diff $testdir/mftrapin.log mftrapin.log

../mf --progname=inimf <$testdir/mftrap2.in >mftrap.fot
$_mf --progname=inimf <$testdir/mftrap2.in >mftrap.fot
mv trap.log mftrap.log || exit 1
mv trap.tfm mftrap.tfm || exit 1
diff $testdir/mftrap.fot mftrap.fot
diff $testdir/mftrap.log mftrap.log

../tftopl ./mftrap.tfm mftrap.pl || exit 1
$_tftopl ./mftrap.tfm mftrap.pl || exit 1
diff $testdir/mftrap.pl mftrap.pl || is_OK=false

../gftype -m -i ./trap.72270gf >trap.typ || exit 1
$_gftype -m -i ./trap.72270gf >trap.typ || exit 1
$DIFF $testdir/trap.typ trap.typ

for f in mftrapin.log mftrap.fot mftrap.log trap.typ; do
Expand Down
5 changes: 5 additions & 0 deletions texk/web2c/mplibdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-09-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* mptraptest.test:
Make easier to test on Windows.

2023-09-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* mp.w: Fixed a buffer overflow.
Expand Down
16 changes: 12 additions & 4 deletions texk/web2c/mplibdir/mptraptest.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ ExeExt=${ExeExt:-}
_mpost=$BinDir/mpost$ExeExt
_pltotf=$BinDir/pltotf$ExeExt

# pre-generated test results in the repository are stored in LF
# but the output might be written in CRLF on some platform.
# if 'diff --strip-trailing-cr' is available, exploit it.
# (useful for tests on win32 binaries run on MSYS shell)
DIFF="diff"
$DIFF --strip-trailing-cr $0 $0 \
&& DIFF="diff --strip-trailing-cr" || echo

testdir=$abs_srcdir/triptrap

TEXMFCNF=$testdir; export TEXMFCNF
Expand All @@ -28,10 +36,10 @@ $LN_S $testdir/mtrap.mp . || exit 1

$_mpost --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
$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
Expand Down
17 changes: 12 additions & 5 deletions texk/web2c/triptest.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
# Copyright 2009-2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

W2CDir=${W2CDir:-..}
ExeExt=${ExeExt:-}
_tex=$W2CDir/tex$ExeExt
_pltotf=$W2CDir/pltotf$ExeExt
_tftopl=$W2CDir/tftopl$ExeExt
_dvitype=$W2CDir/dvitype$ExeExt

LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE

testdir=$abs_srcdir/triptrap
Expand Down Expand Up @@ -58,9 +65,9 @@ is_OK=:

set -x

../pltotf $testdir/trip.pl trip.tfm || exit 1
$_pltotf $testdir/trip.pl trip.tfm || exit 1

../tftopl ./trip.tfm trip.pl || exit 1
$_tftopl ./trip.tfm trip.pl || exit 1

diff $testdir/trip.pl trip.pl || is_OK=false

Expand All @@ -69,7 +76,7 @@ rm -f trip.tex
$LN_S $testdir/trip.tex . || exit 1

rm -f trip.fmt
../tex --progname=initex --ini <$testdir/trip1.in >tripin.fot
$_tex --progname=initex --ini <$testdir/trip1.in >tripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by trip1.in, investigate!" >&2
exit 1
Expand All @@ -78,7 +85,7 @@ mv trip.log tripin.log || exit 1
diff $testdir/tripin.log tripin.log

# May as well test non-ini second time through.
../tex --progname=tex <$testdir/trip2.in >trip.fot
$_tex --progname=tex <$testdir/trip2.in >trip.fot
diff $testdir/trip.fot trip.fot

# We use $DIFF instead of `diff' only for those files where there
Expand All @@ -87,7 +94,7 @@ $DIFF $DIFFFLAGS $testdir/trip.log trip.log

diff $testdir/tripos.tex tripos.tex || is_OK=false

eval ../dvitype $dvitype_args trip.dvi >trip.typ || exit 1
eval $_dvitype $dvitype_args trip.dvi >trip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ trip.typ

for f in tripin.log trip.fot trip.log trip.typ; do
Expand Down
6 changes: 5 additions & 1 deletion texk/web2c/twill.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
# Copyright 2009 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_twill=$BinDir/twill$ExeExt

test -d tests || mkdir -p tests

TEXMFCNF=$srcdir/../kpathsea WEBINPUTS=$srcdir \
./twill pooltype || exit 1
$_twill pooltype || exit 1

0 comments on commit a2cfae4

Please sign in to comment.