diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-20 14:26:56 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-20 14:26:56 +0000 |
commit | bb71bbacb80842b9b3b2e65484493437222f7f34 (patch) | |
tree | b265db45eb108b13b1ce7c6fa3df0fd8a7d90e19 /Build/source/texk/web2c/uptexdir | |
parent | f5a9767f0c69c3e2d9f6c557b14d65bf2cfea1b1 (diff) |
{,e}{,u}ptex: Make easier to test on Windows
git-svn-id: svn://tug.org/texlive/trunk@67990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/uptexdir')
20 files changed, 337 insertions, 113 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index 0f700a0f45f..505a43d0944 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,11 @@ +2023-08-20 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * am/uptex.am, {gkhuge,newjfm,nissya,ptriptest, + sample,skipjfmp,uparse,upbibtex-mem,upbibtex,updvitype, + upkcat,uppltotf,uptftopl,uptriptest,upver, + wcfname,wcfname0,yokotate}.test: + Make easier to test on Windows. + 2023-04-10 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * upbibtex.ch: Fix bug of substring$ diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index 11bb987381f..c4226b35ffb 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -165,9 +165,9 @@ EXTRA_DIST += \ uptexdir/ChangeLog # upTeX Tests -uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test +uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test uptexdir/wcfname0.test uptexdir/uptriptest.log uptexdir/ptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) -uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log: uptex$(EXEEXT) +uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log uptexdir/wcfname0.log: uptex$(EXEEXT) upweb_tests = \ uptexdir/upbibtex.test \ uptexdir/updvitype.test \ diff --git a/Build/source/texk/web2c/uptexdir/gkhuge.test b/Build/source/texk/web2c/uptexdir/gkhuge.test index d85c8d238dd..b3d8cdc3e64 100755 --- a/Build/source/texk/web2c/uptexdir/gkhuge.test +++ b/Build/source/texk/web2c/uptexdir/gkhuge.test @@ -3,6 +3,11 @@ # Copyright 2018 Karl Berry <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests TEXMFCNF=$srcdir/../kpathsea @@ -17,8 +22,8 @@ for font in gkhugeok; do # This test is constructed as a cycle, since JPL source # of gkhugeok.tfm is so large. - ./uptftopl -verbose $testdir/$font.tfm uptests/y$font.pl && \ - ./uppltotf -verbose uptests/y$font.pl uptests/y$font.tfm && \ + $_uptftopl -verbose $testdir/$font.tfm uptests/y$font.pl && \ + $_uppltotf -verbose uptests/y$font.pl uptests/y$font.tfm && \ cmp $testdir/$font.tfm uptests/y$font.tfm && echo || exit 1 done @@ -30,9 +35,9 @@ for font in gkhugeng; do # error message, instead of trying to allocate too much. # The invalid gkhugeng.tfm was erroneously created before # web2c/pltotf.ch change 2017-09-10, due to overflow - ./uptftopl $testdir/$font.tfm uptests/y$font.pl \ + $_uptftopl $testdir/$font.tfm uptests/y$font.pl \ 2>uptests/y$font.err && exit 1 || echo - diff $testdir/$font.err uptests/y$font.err && echo || exit 1 + diff $testdir/$font.err uptests/y$font.err && echo || exit 2 done diff --git a/Build/source/texk/web2c/uptexdir/newjfm.test b/Build/source/texk/web2c/uptexdir/newjfm.test index 3240dad835e..986bbdd0d61 100755 --- a/Build/source/texk/web2c/uptexdir/newjfm.test +++ b/Build/source/texk/web2c/uptexdir/newjfm.test @@ -3,6 +3,11 @@ # Copyright 2018 Karl Berry <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests # Test inputs @@ -11,12 +16,12 @@ testdir=$srcdir/uptexdir/tests # Testing upPLtoTF/upTFtoPL for new JFM spec by texjporg. for font in testnewu; do - ./uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ + $_uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1 TEXMFCNF=$srcdir/../kpathsea \ - ./uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ - diff $testdir/$font.pl uptests/x$font.pl && echo || exit 1 + $_uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ + diff $testdir/$font.pl uptests/x$font.pl && echo || exit 2 done diff --git a/Build/source/texk/web2c/uptexdir/nissya.test b/Build/source/texk/web2c/uptexdir/nissya.test index 3c52edcc5ae..7d7a50120b3 100755 --- a/Build/source/texk/web2c/uptexdir/nissya.test +++ b/Build/source/texk/web2c/uptexdir/nissya.test @@ -7,6 +7,10 @@ # Using data sent by Akira Kakuto <kakuto@fuk.kindai.ac.jp> +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_upbibtex=$BinDir/upbibtex$ExeExt + test -d uptests || mkdir -p uptests cp $srcdir/ptexdir/tests/nissya_bib.aux uptests/nissya_bib.aux @@ -14,11 +18,11 @@ cp $srcdir/ptexdir/tests/nissya_bib.aux uptests/nissya_bib.aux TEXMFCNF=$srcdir/../kpathsea \ BSTINPUTS=$srcdir/ptexdir/tests \ BIBINPUTS=$srcdir/ptexdir/tests \ - ./upbibtex -kanji-internal=euc uptests/nissya_bib || exit 1 + $_upbibtex -kanji-internal=euc uptests/nissya_bib || exit 1 diff $srcdir/ptexdir/tests/nissya_bib.bbl uptests/nissya_bib.bbl || exit 2 TEXMFCNF=$srcdir/../kpathsea \ BSTINPUTS=$srcdir/ptexdir/tests \ BIBINPUTS=$srcdir/ptexdir/tests \ - ./upbibtex uptests/nissya_bib || exit 3 + $_upbibtex uptests/nissya_bib || exit 3 diff --git a/Build/source/texk/web2c/uptexdir/ptriptest.test b/Build/source/texk/web2c/uptexdir/ptriptest.test index 0a1fed1c813..99f6a56ae02 100755 --- a/Build/source/texk/web2c/uptexdir/ptriptest.test +++ b/Build/source/texk/web2c/uptexdir/ptriptest.test @@ -5,6 +5,13 @@ # Copyright 2010-2014 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-..} +ExeExt=${ExeExt:-} +_uptex=$BinDir/uptex$ExeExt +_pltotf=$BinDir/pltotf$ExeExt +_tftopl=$BinDir/tftopl$ExeExt +_dvitype=$BinDir/dvitype$ExeExt + LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE testdir=$abs_srcdir/triptrap @@ -31,9 +38,9 @@ set -x echo "*** TRIP test for upTeX-euc ***." -../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 @@ -41,7 +48,7 @@ diff $testdir/trip.pl trip.pl || is_OK=false $LN_S $testdir/trip.tex . rm -f trip.log -../uptex --kanji-internal=euc --progname=pinitex --ini <$testdir/trip1.in >ptripin.fot +$_uptex --kanji-internal=euc --progname=pinitex --ini <$testdir/trip1.in >ptripin.fot if test ! -s trip.fmt; then echo "*** trip.fmt not created by trip1.in, investigate!" >&2 exit 1 @@ -51,7 +58,7 @@ diff $testdir/tripin.log ptripin.log # May as well test non-ini second time through. rm -f trip.log -../uptex --kanji-internal=euc --progname=ptex <$testdir/trip2.in >ptrip.fot +$_uptex --kanji-internal=euc --progname=ptex <$testdir/trip2.in >ptrip.fot sed "$P_SED1;$P_SED2" trip.log > ptrip.log diff $testdir/trip.fot ptrip.fot @@ -62,7 +69,7 @@ $DIFF $DIFFFLAGS $testdir/trip.log ptrip.log mv tripos.tex ptripos.tex diff $testdir/tripos.tex ptripos.tex || is_OK=false -eval ../dvitype $dvitype_args trip.dvi >ptrip.typ || exit 1 +eval $_dvitype $dvitype_args trip.dvi >ptrip.typ || exit 1 $DIFF $DIFFFLAGS $testdir/trip.typ ptrip.typ $is_OK || { diff --git a/Build/source/texk/web2c/uptexdir/sample.test b/Build/source/texk/web2c/uptexdir/sample.test index 24db4cc946d..7c861125dd0 100755 --- a/Build/source/texk/web2c/uptexdir/sample.test +++ b/Build/source/texk/web2c/uptexdir/sample.test @@ -5,6 +5,10 @@ # Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_updvitype=$BinDir/updvitype$ExeExt + test -d uptests || mkdir -p uptests tfmpath=`$KPSEWHICH cmbx10.tfm` || exit 77 @@ -16,8 +20,8 @@ tfmgrandparent=`dirname "$tfmparent"` testdir=$srcdir/ptexdir/tests TEXMFCNF=$srcdir/../kpathsea \ - TFMFONTS=$testdir:`dirname "$tfmgrandparent"`// \ - ./updvitype -kanji=utf8 -show-opcodes $testdir/sample >uptests/xsample.typ || exit 1 + TFMFONTS="$testdir;"`dirname "$tfmgrandparent"`// \ + $_updvitype -kanji=utf8 -show-opcodes $testdir/sample >uptests/xsample.typ || exit 1 sed 1d uptests/xsample.typ >uptests/xsamplea.typ diff $testdir/samplea.typ uptests/xsamplea.typ || exit 1 diff --git a/Build/source/texk/web2c/uptexdir/skipjfmp.test b/Build/source/texk/web2c/uptexdir/skipjfmp.test index 11c927c332c..1badb93f81e 100755 --- a/Build/source/texk/web2c/uptexdir/skipjfmp.test +++ b/Build/source/texk/web2c/uptexdir/skipjfmp.test @@ -4,6 +4,11 @@ # Copyright 2018 Karl Berry <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests # Test inputs @@ -12,11 +17,11 @@ testdir=$srcdir/ptexdir/tests # Testing pPLtoTF/pTFtoPL compatible mode for SKIP property in GLUEKERN. for font in skipjfmp; do - ./uppltotf -kanji=utf8 -verbose $testdir/$font.pl uptests/x$font.tfm && \ + $_uppltotf -kanji=utf8 -verbose $testdir/$font.pl uptests/x$font.tfm && \ cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1 TEXMFCNF=$srcdir/../kpathsea \ - ./uptftopl -kanji=utf8 -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ + $_uptftopl -kanji=utf8 -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ diff $testdir/$font.pl uptests/x$font.pl && echo || exit 1 done diff --git a/Build/source/texk/web2c/uptexdir/uparse.test b/Build/source/texk/web2c/uptexdir/uparse.test index a51e5945f82..bad31cddc5f 100755 --- a/Build/source/texk/web2c/uptexdir/uparse.test +++ b/Build/source/texk/web2c/uptexdir/uparse.test @@ -3,6 +3,11 @@ # Copyright 2018 Karl Berry <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests # Test inputs @@ -14,7 +19,7 @@ for font in uparse; do # allow hex kanji code with arbitary digits, # no error for no trailing spaces. - ./uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ + $_uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1 # upTFtoPL should always print ASCII characters in charcode format, @@ -23,9 +28,9 @@ for font in uparse; do # This test is constructed as a cycle, so that there is no # non-ASCII character inside test case distribution. TEXMFCNF=$srcdir/../kpathsea \ - ./uptftopl -verbose $testdir/$font.tfm uptests/y$font.pl && \ - ./uppltotf -verbose uptests/y$font.pl uptests/y$font.tfm && \ - cmp $testdir/$font.tfm uptests/y$font.tfm && echo || exit 1 + $_uptftopl -verbose $testdir/$font.tfm uptests/y$font.pl && \ + $_uppltotf -verbose uptests/y$font.pl uptests/y$font.tfm && \ + cmp $testdir/$font.tfm uptests/y$font.tfm && echo || exit 2 done diff --git a/Build/source/texk/web2c/uptexdir/upbibtex-mem.test b/Build/source/texk/web2c/uptexdir/upbibtex-mem.test index 2aae3431231..9824aabf5f6 100755 --- a/Build/source/texk/web2c/uptexdir/upbibtex-mem.test +++ b/Build/source/texk/web2c/uptexdir/upbibtex-mem.test @@ -7,6 +7,10 @@ # Using test data from Philipp Lehman <lehman@gmx.net> +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_upbibtex=$BinDir/upbibtex$ExeExt + test -d uptests || mkdir -p uptests # Create bib data @@ -65,7 +69,7 @@ for t in 1 2 3; do TEXMFCNF=$srcdir/../kpathsea \ BSTINPUTS=$srcdir/tests \ BIBINPUTS=./uptests \ - ./upbibtex uptests/memtest$t || exit 1 + $_upbibtex uptests/memtest$t || exit $t done diff --git a/Build/source/texk/web2c/uptexdir/upbibtex.test b/Build/source/texk/web2c/uptexdir/upbibtex.test index 1b42c155a70..7b880ef97c6 100755 --- a/Build/source/texk/web2c/uptexdir/upbibtex.test +++ b/Build/source/texk/web2c/uptexdir/upbibtex.test @@ -4,12 +4,16 @@ # Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_upbibtex=$BinDir/upbibtex$ExeExt + test -d uptests || mkdir -p uptests rm -f uptests/xexampl.* uptests/xenc*.* rc=0 -./upbibtex -version || rc=100 +$_upbibtex -version || rc=100 TEXMFCNF=$srcdir/../kpathsea BSTINPUTS=$srcdir/tests @@ -18,60 +22,60 @@ export TEXMFCNF BSTINPUTS BIBINPUTS cp $srcdir/tests/exampl.aux uptests/xexampl.aux -./upbibtex uptests/xexampl || rc=1 +$_upbibtex uptests/xexampl || rc=1 diff $srcdir/tests/exampl.bbl uptests/xexampl.bbl || rc=2 cp $srcdir/tests/enc.aux uptests/xenc.aux -guess_input_kanji_encoding=1 ./upbibtex uptests/xenc || rc=3 +guess_input_kanji_encoding=1 $_upbibtex uptests/xenc || rc=3 diff $srcdir/tests/enc-u.bbl uptests/xenc.bbl || rc=4 cp $srcdir/tests/enc-e.aux uptests/xenc-e.aux -guess_input_kanji_encoding=1 ./upbibtex -kanji=euc uptests/xenc-e || rc=5 +guess_input_kanji_encoding=1 $_upbibtex -kanji=euc uptests/xenc-e || rc=5 diff $srcdir/tests/enc-eu.bbl uptests/xenc-e.bbl || rc=6 cp $srcdir/tests/enc-s.aux uptests/xenc-s.aux -./upbibtex -guess-input-enc -kanji=sjis uptests/xenc-s || rc=7 +$_upbibtex -guess-input-enc -kanji=sjis uptests/xenc-s || rc=7 diff $srcdir/tests/enc-su.bbl uptests/xenc-s.bbl || rc=8 cp $srcdir/tests/enc-u.aux uptests/xenc-u0.aux -./upbibtex -no-guess-input-enc uptests/xenc-u0 || rc=9 +$_upbibtex -no-guess-input-enc uptests/xenc-u0 || rc=9 diff $srcdir/tests/enc-uu.bbl uptests/xenc-u0.bbl || rc=10 -./upbibtex -guess-input-enc uptests/xenc-u0 || rc=11 +$_upbibtex -guess-input-enc uptests/xenc-u0 || rc=11 diff $srcdir/tests/enc-uu.bbl uptests/xenc-u0.bbl || rc=12 ## -kanji-internal=euc, compatible with pbibtex cp $srcdir/tests/enc.aux uptests/xenc-u-e.aux -guess_input_kanji_encoding=1 ./upbibtex -kanji-internal=euc uptests/xenc-u-e || rc=53 +guess_input_kanji_encoding=1 $_upbibtex -kanji-internal=euc uptests/xenc-u-e || rc=53 diff $srcdir/tests/enc-p.bbl uptests/xenc-u-e.bbl || rc=54 cp $srcdir/tests/enc-e.aux uptests/xenc-e-e.aux -guess_input_kanji_encoding=1 ./upbibtex -kanji=euc -kanji-internal=euc uptests/xenc-e-e || rc=55 +guess_input_kanji_encoding=1 $_upbibtex -kanji=euc -kanji-internal=euc uptests/xenc-e-e || rc=55 diff $srcdir/tests/enc-ep.bbl uptests/xenc-e-e.bbl || rc=56 cp $srcdir/tests/enc-s.aux uptests/xenc-s-e.aux -./upbibtex -guess-input-enc -kanji=sjis -kanji-internal=euc uptests/xenc-s-e || rc=57 +$_upbibtex -guess-input-enc -kanji=sjis -kanji-internal=euc uptests/xenc-s-e || rc=57 diff $srcdir/tests/enc-sp.bbl uptests/xenc-s-e.bbl || rc=58 cp $srcdir/tests/enc-u.aux uptests/xenc-u0-e.aux -./upbibtex -no-guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=59 +$_upbibtex -no-guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=59 diff $srcdir/tests/enc-up.bbl uptests/xenc-u0-e.bbl || rc=60 -./upbibtex -guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=61 +$_upbibtex -guess-input-enc -kanji-internal=euc uptests/xenc-u0-e || rc=61 diff $srcdir/tests/enc-up.bbl uptests/xenc-u0-e.bbl || rc=62 diff --git a/Build/source/texk/web2c/uptexdir/updvitype.test b/Build/source/texk/web2c/uptexdir/updvitype.test index 515f50f373d..5bb559f934e 100755 --- a/Build/source/texk/web2c/uptexdir/updvitype.test +++ b/Build/source/texk/web2c/uptexdir/updvitype.test @@ -5,19 +5,25 @@ # Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_updvitype=$BinDir/updvitype$ExeExt + test -d uptests || mkdir -p uptests +rc=0 + if tfmpath=`$KPSEWHICH cmbx10.tfm`; then TEXMFCNF=$srcdir/../kpathsea \ TFMFONTS=`dirname "$tfmpath"` \ - ./updvitype -show-opcodes $srcdir/tests/story >uptests/xstory.dvityp || exit 1 + $_updvitype -show-opcodes $srcdir/tests/story >uptests/xstory.dvityp || rc=1 fi TEXMFCNF=$srcdir/../kpathsea \ TFMFONTS=$srcdir/tests \ - ./updvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >uptests/xpagenum.typ || exit 2 + $_updvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >uptests/xpagenum.typ || rc=2 TEXMFCNF=$srcdir/../kpathsea @@ -26,14 +32,16 @@ export TEXMFCNF TFMFONTS for enc in utf8 jis; do for doc in ptex3 ptex4; do - ./updvitype -kanji=$enc $srcdir/ptexdir/tests/$doc.dvi >uptests/x$doc-$enc.typ || exit 3 + $_updvitype -kanji=$enc $srcdir/ptexdir/tests/$doc.dvi >uptests/x$doc-$enc.typ || rc=3 sed 1d uptests/x$doc-$enc.typ >uptests/x${doc}a-$enc.typ - diff $srcdir/ptexdir/tests/${doc}a-$enc.typ uptests/x${doc}a-$enc.typ || exit 4 + diff $srcdir/ptexdir/tests/${doc}a-$enc.typ uptests/x${doc}a-$enc.typ || rc=4 done done for doc in uptex3 uptex4; do - ./updvitype $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc.typ || exit 5 + $_updvitype $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc.typ || rc=5 sed 1d uptests/x$doc.typ >uptests/x${doc}a.typ - diff $srcdir/uptexdir/tests/${doc}a.typ uptests/x${doc}a.typ || exit 6 + diff $srcdir/uptexdir/tests/${doc}a.typ uptests/x${doc}a.typ || rc=6 done + +exit $rc diff --git a/Build/source/texk/web2c/uptexdir/upkcat.test b/Build/source/texk/web2c/uptexdir/upkcat.test index 28ceca8ccfa..195fb9c5be4 100755 --- a/Build/source/texk/web2c/uptexdir/upkcat.test +++ b/Build/source/texk/web2c/uptexdir/upkcat.test @@ -3,12 +3,16 @@ # Copyright 2022 TANAKA Takuji <ttk@t-lab.opal.ne.jp> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uptex=$BinDir/uptex$ExeExt + LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF -TEXINPUTS=$srcdir/uptexdir/tests:.; export TEXINPUTS +TEXINPUTS="$srcdir/uptexdir/tests;."; export TEXINPUTS -./uptex -ini -interaction batchmode -jobname upkcat-log kcat.tex || exit 1 +$_uptex -ini -interaction batchmode -jobname upkcat-log kcat.tex || exit 1 grep '::' upkcat-log.log > upkcat-log_ed.log \ && diff upkcat-log_ed.log $srcdir/uptexdir/tests/upkcat.txt || exit 2 diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.test b/Build/source/texk/web2c/uptexdir/uppltotf.test index 845a5c51441..d02fc1e9570 100755 --- a/Build/source/texk/web2c/uptexdir/uppltotf.test +++ b/Build/source/texk/web2c/uptexdir/uppltotf.test @@ -4,7 +4,11 @@ # Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt + test -d uptests || mkdir -p uptests -./uppltotf -verbose $srcdir/tests/cmr10 uptests/xcmr10 || exit 1 +$_uppltotf -verbose $srcdir/tests/cmr10 uptests/xcmr10 || exit 1 diff --git a/Build/source/texk/web2c/uptexdir/uptftopl.test b/Build/source/texk/web2c/uptexdir/uptftopl.test index 0f0aab1d6ed..b9d68e89ef2 100755 --- a/Build/source/texk/web2c/uptexdir/uptftopl.test +++ b/Build/source/texk/web2c/uptexdir/uptftopl.test @@ -4,8 +4,12 @@ # Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests TEXMFCNF=$srcdir/../kpathsea \ - ./uptftopl -verbose $srcdir/tests/cmr10 uptests/xcmr10 || exit 1 + $_uptftopl -verbose $srcdir/tests/cmr10 uptests/xcmr10 || exit 1 diff --git a/Build/source/texk/web2c/uptexdir/uptriptest.test b/Build/source/texk/web2c/uptexdir/uptriptest.test index 8035f023bb3..b58cd8a0cf4 100755 --- a/Build/source/texk/web2c/uptexdir/uptriptest.test +++ b/Build/source/texk/web2c/uptexdir/uptriptest.test @@ -4,6 +4,13 @@ # Copyright 2011-2014 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-..} +ExeExt=${ExeExt:-} +_uptex=$BinDir/uptex$ExeExt +_pltotf=$BinDir/pltotf$ExeExt +_tftopl=$BinDir/tftopl$ExeExt +_dvitype=$BinDir/dvitype$ExeExt + LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE testdir=$abs_srcdir/triptrap @@ -30,9 +37,9 @@ set -x echo "*** TRIP test for upTeX ***." -../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 @@ -40,7 +47,7 @@ diff $testdir/trip.pl trip.pl || is_OK=false $LN_S $testdir/trip.tex . rm -f trip.log -../uptex --progname=upinitex --ini <$testdir/trip1.in >uptripin.fot +$_uptex --progname=upinitex --ini <$testdir/trip1.in >uptripin.fot if test ! -s trip.fmt; then echo "*** trip.fmt not created by trip1.in, investigate!" >&2 exit 1 @@ -50,7 +57,7 @@ diff $testdir/tripin.log uptripin.log # May as well test non-ini second time through. rm -f trip.log -../uptex --progname=uptex <$testdir/trip2.in >uptrip.fot +$_uptex --progname=uptex <$testdir/trip2.in >uptrip.fot sed "$P_SED1;$P_SED2" trip.log > uptrip.log diff $testdir/trip.fot uptrip.fot @@ -61,7 +68,7 @@ $DIFF $DIFFFLAGS $testdir/trip.log uptrip.log mv tripos.tex uptripos.tex diff $testdir/tripos.tex uptripos.tex || is_OK=false -eval ../dvitype $dvitype_args trip.dvi >uptrip.typ || exit 1 +eval $_dvitype $dvitype_args trip.dvi >uptrip.typ || exit 1 $DIFF $DIFFFLAGS $testdir/trip.typ uptrip.typ $is_OK || { diff --git a/Build/source/texk/web2c/uptexdir/upver.test b/Build/source/texk/web2c/uptexdir/upver.test index 9384214603f..812c7efcccc 100755 --- a/Build/source/texk/web2c/uptexdir/upver.test +++ b/Build/source/texk/web2c/uptexdir/upver.test @@ -3,13 +3,17 @@ # Copyright 2019 Hironobu Yamashita <h.y.acetaminophen@gmail.com> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uptex=$BinDir/uptex$ExeExt + LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF -TEXINPUTS=$srcdir/ptexdir/tests:.; export TEXINPUTS +TEXINPUTS="$srcdir/ptexdir/tests;."; export TEXINPUTS # check consistency between runtime terminal and log -./uptex -ini -interaction batchmode -jobname upver1-log pver1.tex >upver1-term.log || exit 1 +$_uptex -ini -interaction batchmode -jobname upver1-log pver1.tex >upver1-term.log || exit 1 sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \ upver1-term.log >upver1-term_ed.log || exit 1 sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \ @@ -17,13 +21,13 @@ sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \ diff upver1-term_ed.log upver1-log_ed.log || exit 2 # check consistency between runtime and version output -./uptex -version >upver2-self.log || exit 1 +$_uptex -version >upver2-self.log || exit 1 sed -n '1 s/^\([-A-Za-z]*\) [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \ upver2-self.log >upver2-self_ed.log || exit 1 diff upver1-term_ed.log upver2-self_ed.log || exit 4 # check consistency between version output and version primitives -./uptex -ini -interaction batchmode -jobname upver2-prim pver2.tex || exit 1 +$_uptex -ini -interaction batchmode -jobname upver2-prim pver2.tex || exit 1 sed -n 's/^Engine \([-A-Za-z]*\) \([^ ]*\) \(.*\)/\1 \2/p' \ upver2-prim.log >upver2-prim_ed.log || exit 1 diff upver2-self_ed.log upver2-prim_ed.log || exit 8 diff --git a/Build/source/texk/web2c/uptexdir/wcfname.test b/Build/source/texk/web2c/uptexdir/wcfname.test index c988e1f3e9f..f02c876ce5d 100755 --- a/Build/source/texk/web2c/uptexdir/wcfname.test +++ b/Build/source/texk/web2c/uptexdir/wcfname.test @@ -3,17 +3,32 @@ # Copyright 2022-2023 Japanese TeX Development Community <issue@texjp.org> # You may freely use, modify and/or distribute this file. -test -d uptests || mkdir -p uptests -rm -f uptests/fn*.log uptests/fn*.txt uptests/fn*.tex fn*.tex +engine=uptex +testdir=uptests -rc=0 +KpsDir=${KpsDir:-../kpathsea} +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_kpsewhich=$KpsDir/kpsewhich$ExeExt +_tex=$BinDir/$engine$ExeExt + +test -d $testdir || mkdir -p $testdir +rm -f $testdir/fn*.log $testdir/fn*.txt $testdir/fn*.tex fn*.tex + +rc=0; err1=; err2= TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF -TEXINPUTS=uptests:.; export TEXINPUTS +TEXINPUTS="$testdir;."; export TEXINPUTS + +$_kpsewhich -var-value=TEXMFCNF +$_kpsewhich -progname=$engine -var-value=TEXINPUTS +$_kpsewhich -progname=$engine -var-value=command_line_encoding +$_kpsewhich -progname=$engine -var-value=guess_input_kanji_encoding for loc in C.UTF-8 C.utf8 en_US.UTF-8 en_US.utf8 ja_JP.UTF-8 ja_JP.utf8; do locale -a | grep "^$loc\$" ret=$? + # For Slackware linux, we need to replace from utf8 to UTF-8 if [ -f /etc/slackware-version ]; then loc=`echo $loc | sed -e "s/utf8/UTF-8/"` fi @@ -28,54 +43,35 @@ if [ $ret != 0 ]; then LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE fi -perl $srcdir/tests/fn-generate.perl uptests +if [ "$COMSPEC" != "" ] || [ "$ExeExt" = ".exe" ]; then + echo "*** We guess OS is Windows." + MyOS=Windows +else + echo "*** We guess OS is not Windows." + MyOS=nonWindows +fi +if [ "$ExeExt" = ".exe" ]; then + opt_win=-windows +else + opt_win= +fi + +perl -s $srcdir/tests/fn-generate.perl $opt_win $testdir pret=$? if [ $pret != 0 ] && [ $pret != 239 ]; then - exit 128 + exit 77 fi # upTeX internal encoding fenc="utf8" -for ienc in euc sjis uptex; do +for ienc in uptex; do for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc; do if [ $ienc != uptex -a $doc = fn£¥µÆÇñß-$fenc ]; then continue fi - if [ "$COMSPEC" != "" ]; then - echo "*** We guess OS is Windows." - if [ $ienc = uptex ]; then - command_line_encoding=utf8 - export command_line_encoding - else - command_line_encoding=none - export command_line_encoding - fi - fi - - echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc - ./uptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >uptests/$doc-$ienc-term.log || rc=1 - mv $doc-$ienc.txt $doc-$ienc.log uptests/ - diff uptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2 - -done -done - -if [ $pret = 239 ]; then - echo "*** skip tests for Shift_JIS & EUC-JP." - exit 0 -fi - - -# pTeX compatible mode, regacy encoding -for fenc in sjis euc; do -for doc in fnさざ波-$fenc; do - - ienc=$fenc - if [ "$COMSPEC" != "" ]; then - echo "*** We guess OS is Windows." - if [ $fenc != euc ]; then ienc="sjis"; fi + if [ $MyOS = Windows ]; then if [ $ienc = uptex ]; then command_line_encoding=utf8 export command_line_encoding @@ -83,22 +79,27 @@ for doc in fnさざ波-$fenc; do command_line_encoding=none export command_line_encoding fi - else - echo "*** We guess OS is not Windows." - if [ $fenc != sjis ]; then ienc="euc"; fi - fi - if [ $ienc != uptex ]; then - guess_input_kanji_encoding=1 - export guess_input_kanji_encoding fi echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc - ./uptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >uptests/$doc-$fenc-term.log || rc=3 - mv $doc-$ienc.txt $doc-$ienc.log uptests/ - diff uptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4 + $_kpsewhich -progname=$engine $doc.tex || rc=10 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } + $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ + { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } done done +if [ $rc -gt 0 ]; then + if [ -n "$err1" ]; then echo ERROR1 $err1; fi + if [ -n "$err2" ]; then echo ERROR2 $err2; fi +else + echo PASS +fi exit $rc diff --git a/Build/source/texk/web2c/uptexdir/wcfname0.test b/Build/source/texk/web2c/uptexdir/wcfname0.test new file mode 100755 index 00000000000..bc67f869db8 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/wcfname0.test @@ -0,0 +1,136 @@ +#! /bin/sh -vx +# +# Copyright 2022-2023 Japanese TeX Development Community <issue@texjp.org> +# You may freely use, modify and/or distribute this file. + +engine=uptex +testdir=up0tests + +KpsDir=${KpsDir:-../kpathsea} +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_kpsewhich=$KpsDir/kpsewhich$ExeExt +_tex=$BinDir/$engine$ExeExt + +test -d $testdir || mkdir -p $testdir +rm -f $testdir/fn*.log $testdir/fn*.txt $testdir/fn*.tex fn*.tex + +rc=0; err1=; err2=; err3=; err4= + +TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF +TEXINPUTS="$testdir;."; export TEXINPUTS + +$_kpsewhich -var-value=TEXMFCNF +$_kpsewhich -progname=$engine -var-value=TEXINPUTS +$_kpsewhich -progname=$engine -var-value=command_line_encoding +$_kpsewhich -progname=$engine -var-value=guess_input_kanji_encoding + +for loc in C.UTF-8 C.utf8 en_US.UTF-8 en_US.utf8 ja_JP.UTF-8 ja_JP.utf8; do + locale -a | grep "^$loc\$" + ret=$? + # For Slackware linux, we need to replace from utf8 to UTF-8 + if [ -f /etc/slackware-version ]; then + loc=`echo $loc | sed -e "s/utf8/UTF-8/"` + fi + if [ $ret = 0 ]; then + LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE + break + fi +done +if [ $ret != 0 ]; then + # linux musl fails to run `locale -a` but seems to have C.UTF-8 + loc=C.UTF-8 + LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE +fi + +if [ "$COMSPEC" != "" ] || [ "$ExeExt" = ".exe" ]; then + echo "*** We guess OS is Windows." + MyOS=Windows + try_ienc="sjis" +else + echo "*** We guess OS is not Windows." + MyOS=nonWindows + try_ienc="euc sjis" +fi +if [ "$ExeExt" = ".exe" ]; then + opt_win=-windows +else + opt_win= +fi + +perl -s $srcdir/tests/fn-generate.perl $opt_win $testdir +pret=$? +if [ $pret != 0 ] && [ $pret != 239 ]; then + exit 77 +fi + +# upTeX internal encoding +fenc="utf8" +for ienc in $try_ienc; do +for doc in fn-$fenc fnさざ波-$fenc; do + + if [ $MyOS = Windows ]; then + command_line_encoding=none + export command_line_encoding + fi + + echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc + $_kpsewhich -progname=$engine $doc.tex || rc=10 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } + $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ + { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } + rm -f $testdir/fn±×÷§¶-utf8-tmp.tex + +done +done + +if [ $pret = 239 ]; then + echo "*** skip tests for Shift_JIS & EUC-JP." + exit 0 +fi + + +# pTeX compatible mode, regacy encoding +for fenc in sjis euc; do +for doc in fnさざ波-$fenc; do + + ienc=$fenc + if [ $MyOS = Windows ]; then + ienc="sjis" + command_line_encoding=none + export command_line_encoding + else + if [ $fenc != sjis ]; then ienc="euc"; fi + fi + guess_input_kanji_encoding=1 + export guess_input_kanji_encoding + + echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc + $_kpsewhich -progname=$engine $doc.tex || rc=20 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=21 + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + { rc=3 ; err3=$err3" $fenc:$ienc:$doc" ; } + $_kpsewhich -progname=$engine $doc-tmp.tex || rc=22 + $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=23 + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ + { rc=4 ; err4=$err4" $fenc:$ienc:$doc" ; } + +done +done + + +if [ $rc -gt 0 ]; then + if [ -n "$err1" ]; then echo ERROR1 $err1; fi + if [ -n "$err2" ]; then echo ERROR2 $err2; fi + if [ -n "$err3" ]; then echo ERROR3 $err3; fi + if [ -n "$err4" ]; then echo ERROR4 $err4; fi +else + echo PASS +fi +exit $rc diff --git a/Build/source/texk/web2c/uptexdir/yokotate.test b/Build/source/texk/web2c/uptexdir/yokotate.test index bb987f0d607..bb62252fa3d 100755 --- a/Build/source/texk/web2c/uptexdir/yokotate.test +++ b/Build/source/texk/web2c/uptexdir/yokotate.test @@ -5,6 +5,11 @@ # Copyright 2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_uppltotf=$BinDir/uppltotf$ExeExt +_uptftopl=$BinDir/uptftopl$ExeExt + test -d uptests || mkdir -p uptests TEXMFCNF=$srcdir/../kpathsea @@ -16,10 +21,10 @@ testdir=$srcdir/uptexdir/tests # Testing upPLtoTF/upTFtoPL for umin10 (yoko=horiz) and utmin10 (tate=vert). for font in umin10 utmin10; do - ./uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ + $_uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1 - ./uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ + $_uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \ diff $testdir/$font.pl uptests/x$font.pl && echo || exit 2 done @@ -31,24 +36,24 @@ testdir=$srcdir/ptexdir/tests # Testing pPLtoTF/pTFtoPL compatible mode for character range & encoding. for font in chcode; do - ./uppltotf -kanji=utf8 $testdir/$font.pl uptests/x$font.tfm && \ + $_uppltotf -kanji=utf8 $testdir/$font.pl uptests/x$font.tfm && \ cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 3 - ./uptftopl -kanji=utf8 -charcode-format octal $testdir/$font.tfm uptests/x$font.pl && \ + $_uptftopl -kanji=utf8 -charcode-format octal $testdir/$font.tfm uptests/x$font.pl && \ diff $testdir/$font.pl uptests/x$font.pl && echo || exit 4 for enc in utf8 euc sjis jis; do - ./uppltotf -kanji=$enc $testdir/$font-$enc.pl uptests/x$font-$enc.tfm && \ + $_uppltotf -kanji=$enc $testdir/$font-$enc.pl uptests/x$font-$enc.tfm && \ cmp $testdir/$font.tfm uptests/x$font-$enc.tfm && echo || exit 5 - ./uptftopl -kanji=$enc $testdir/$font.tfm uptests/x$font-$enc.pl && \ + $_uptftopl -kanji=$enc $testdir/$font.tfm uptests/x$font-$enc.pl && \ if [ $enc = utf8 ]; then \ perl -i".orig" -CD -pe "use utf8; tr/―~∥-¢£¬/—〜‖−¢£¬/" uptests/x$font-$enc.pl; fi && \ diff $testdir/$font-$enc.pl uptests/x$font-$enc.pl && echo || exit 6 if [ $enc = utf8 ]; then - ./uppltotf -kanji=$enc uptests/x$font-$enc.pl.orig uptests/x$font-$enc.tfm && \ + $_uppltotf -kanji=$enc uptests/x$font-$enc.pl.orig uptests/x$font-$enc.tfm && \ cmp $testdir/$font.tfm uptests/x$font-$enc.tfm && echo || exit 7 fi |