texlive[67990] Build/source/texk/web2c: {,e}{,u}ptex: Make easier to
commits+takuji at tug.org
commits+takuji at tug.org
Sun Aug 20 16:26:57 CEST 2023
Revision: 67990
http://tug.org/svn/texlive?view=revision&revision=67990
Author: takuji
Date: 2023-08-20 16:26:56 +0200 (Sun, 20 Aug 2023)
Log Message:
-----------
{,e}{,u}ptex: Make easier to test on Windows
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/Makefile.in
trunk/Build/source/texk/web2c/eptexdir/ChangeLog
trunk/Build/source/texk/web2c/eptexdir/eptriptest.test
trunk/Build/source/texk/web2c/eptexdir/epver.test
trunk/Build/source/texk/web2c/eptexdir/pdfprimitive.test
trunk/Build/source/texk/web2c/eptexdir/wcfname.test
trunk/Build/source/texk/web2c/euptexdir/ChangeLog
trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
trunk/Build/source/texk/web2c/euptexdir/eptriptest.test
trunk/Build/source/texk/web2c/euptexdir/euptriptest.test
trunk/Build/source/texk/web2c/euptexdir/eupver.test
trunk/Build/source/texk/web2c/euptexdir/pdfprimitive.test
trunk/Build/source/texk/web2c/euptexdir/wcfname.test
trunk/Build/source/texk/web2c/ptexdir/ChangeLog
trunk/Build/source/texk/web2c/ptexdir/ptriptest.test
trunk/Build/source/texk/web2c/ptexdir/pver.test
trunk/Build/source/texk/web2c/ptexdir/wcfname.test
trunk/Build/source/texk/web2c/ptexdir/zfmtcompress.test
trunk/Build/source/texk/web2c/tests/fn-generate.perl
trunk/Build/source/texk/web2c/uptexdir/ChangeLog
trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
trunk/Build/source/texk/web2c/uptexdir/gkhuge.test
trunk/Build/source/texk/web2c/uptexdir/newjfm.test
trunk/Build/source/texk/web2c/uptexdir/nissya.test
trunk/Build/source/texk/web2c/uptexdir/ptriptest.test
trunk/Build/source/texk/web2c/uptexdir/sample.test
trunk/Build/source/texk/web2c/uptexdir/skipjfmp.test
trunk/Build/source/texk/web2c/uptexdir/uparse.test
trunk/Build/source/texk/web2c/uptexdir/upbibtex-mem.test
trunk/Build/source/texk/web2c/uptexdir/upbibtex.test
trunk/Build/source/texk/web2c/uptexdir/updvitype.test
trunk/Build/source/texk/web2c/uptexdir/upkcat.test
trunk/Build/source/texk/web2c/uptexdir/uppltotf.test
trunk/Build/source/texk/web2c/uptexdir/uptftopl.test
trunk/Build/source/texk/web2c/uptexdir/uptriptest.test
trunk/Build/source/texk/web2c/uptexdir/upver.test
trunk/Build/source/texk/web2c/uptexdir/wcfname.test
trunk/Build/source/texk/web2c/uptexdir/yokotate.test
Added Paths:
-----------
trunk/Build/source/texk/web2c/euptexdir/wcfname0.test
trunk/Build/source/texk/web2c/uptexdir/wcfname0.test
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ChangeLog 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,6 +3,7 @@
* mftraptest.test,
* triptest.test: Filter Web2C year in banner.
Make easier to test on Windows.
+ * Makefile.in: Add tests {,e}uptexdir/wcfname0.test.
2023-08-19 Andreas Scherer <https://ascherer.github.io>
Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/Makefile.in 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3548,21 +3548,21 @@
tests/xptmr*.vpl badvpl.* tests/yptmr*.* pooltype.tex ctie.c \
cweave.c ctwill.c ctwill-refsort.c ctwill-twinx.c tie.c \
ctie.outc ctie.outm ham.aux ham.idx ham.scn ham.sref ham.tex \
- ham-sorted.tex common.tex common.scn common.idx tie.outc \
- tie.outm $(nodist_tex_SOURCES) tex-final.ch tex-web2c tex.p \
- tex.pool tex-tangle trip.diffs write18-quote.log mftrap.diffs \
- $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c mf.p mf.pool \
- mf-tangle mfluatrap.diffs $(nodist_libmflua_a_SOURCES) \
- mflua.web mflua.ch mflua-web2c mflua.p mflua.pool mflua-tangle \
- mfluatrap.diffs mfluajittrap.diffs \
- $(nodist_libmfluajit_a_SOURCES) mfluajit.web mfluajit.ch \
- mfluajit-web2c mfluajit.p mfluajit.pool mfluajit-tangle \
- mfluajittrap.diffs $(nodist_mpost_SOURCES) mpxout-tangle \
- mptrap.diffs ptmr.mpx tests/xptmr.mpx tests/xstory.mpx \
- $(nodist_pmpost_SOURCES) pmp.w pmpost.w pmpxout.w ppsout.w \
- psvgout.w ptfmin.w pmp-tangle pmpxout-tangle ppsout-tangle \
- psvgout-tangle pmpsamp.* upmpsamp.* \
- $(nodist_libmplibcore_a_SOURCES) \
+ ham-sorted.tex index.tex common.tex common.scn common.idx \
+ tie.outc tie.outm $(nodist_tex_SOURCES) tex-final.ch tex-web2c \
+ tex.p tex.pool tex-tangle trip.diffs write18-quote.log \
+ mftrap.diffs $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c \
+ mf.p mf.pool mf-tangle mfluatrap.diffs \
+ $(nodist_libmflua_a_SOURCES) mflua.web mflua.ch mflua-web2c \
+ mflua.p mflua.pool mflua-tangle mfluatrap.diffs \
+ mfluajittrap.diffs $(nodist_libmfluajit_a_SOURCES) \
+ mfluajit.web mfluajit.ch mfluajit-web2c mfluajit.p \
+ mfluajit.pool mfluajit-tangle mfluajittrap.diffs \
+ $(nodist_mpost_SOURCES) mpxout-tangle mptrap.diffs ptmr.mpx \
+ tests/xptmr.mpx tests/xstory.mpx $(nodist_pmpost_SOURCES) \
+ pmp.w pmpost.w pmpxout.w ppsout.w psvgout.w ptfmin.w \
+ pmp-tangle pmpxout-tangle ppsout-tangle psvgout-tangle \
+ pmpsamp.* upmpsamp.* $(nodist_libmplibcore_a_SOURCES) \
$(nodist_libmplibextramath_a_SOURCES) \
$(nodist_libmplibbackends_a_SOURCES) mp-tangle mpmath-tangle \
mpmathdecimal-tangle mpmathdouble-tangle mpstrings-tangle \
@@ -4508,7 +4508,7 @@
uptftopl_DEPENDENCIES = $(uptex_dependencies)
# 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
# uppPLtoTF/upTFtoPL
upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \
uptexdir/uppltotf.test uptexdir/uptftopl.test \
@@ -4566,7 +4566,7 @@
# e-upTeX Tests
#
-euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test
+euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test euptexdir/wcfname0.test
# At the moment, these are the only man pages handled in the
# conglomerated web2c/Makefile[.am]. (All the others are in man/.)
@@ -22068,7 +22068,7 @@
uptftopl.web: tie$(EXEEXT) tftopl.web tftopl.ch
$(tie_m) tftopl.web tftopl.ch
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)
uptexdir/upbibtex.log: upbibtex$(EXEEXT)
uptexdir/updvitype.log: updvitype$(EXEEXT)
uptexdir/uppltotf.log: uppltotf$(EXEEXT)
@@ -22110,7 +22110,7 @@
$(tie_c) euptex.web $(euptex_ch_srcs)
euptexdir/euptriptest.log euptexdir/eptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
euptexdir/pdfprimitive.log: euptex$(EXEEXT)
-euptexdir/eupver.log euptexdir/wcfname.log: euptex$(EXEEXT)
+euptexdir/eupver.log euptexdir/wcfname.log euptexdir/wcfname0.log: euptex$(EXEEXT)
euptrip.diffs: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
$(triptrap_diffs) $@
.PHONY: euptrip-clean
Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog 2023-08-20 14:26:56 UTC (rev 67990)
@@ -1,3 +1,8 @@
+2023-08-20 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * {eptriptest,epver,pdfprimitive,wcfname}.test:
+ Make easier to test on Windows.
+
2023-03-29 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* wcfname.test:
Modified: trunk/Build/source/texk/web2c/eptexdir/eptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/eptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/eptexdir/eptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,6 +5,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-..}
+ExeExt=${ExeExt:-}
+_eptex=$BinDir/eptex$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
@@ -32,9 +39,9 @@
echo "*** TRIP test for e-pTeX 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
@@ -42,7 +49,7 @@
$LN_S $testdir/trip.tex .
rm -f trip.log
-../eptex --progname=epinitex --ini <$testdir/trip1.in >cptripin.fot
+$_eptex --progname=epinitex --ini <$testdir/trip1.in >cptripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by trip1.in, investigate!" >&2
exit 1
@@ -52,7 +59,7 @@
# May as well test non-ini second time through.
rm -f trip.log
-../eptex --progname=eptex <$testdir/trip2.in >cptrip.fot
+$_eptex --progname=eptex <$testdir/trip2.in >cptrip.fot
sed "$P_SED1;$P_SED2" trip.log > cptrip.log
diff $testdir/trip.fot cptrip.fot
@@ -63,7 +70,7 @@
mv tripos.tex cptripos.tex
diff $testdir/tripos.tex cptripos.tex
-eval ../dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1
+eval $_dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ
mv trip.fmt ctrip.fmt
@@ -73,7 +80,7 @@
echo "*** TRIP test for e-pTeX in extended mode ***."
rm -f trip.log
-../eptex --progname=epinitex --ini <$etestdir/etrip1.in >xptripin.fot
+$_eptex --progname=epinitex --ini <$etestdir/etrip1.in >xptripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by etrip1.in, investigate!" >&2
exit 1
@@ -83,7 +90,7 @@
# May as well test non-ini second time through.
rm -f trip.log
-../eptex --progname=eptex <$etestdir/trip2.in >xptrip.fot
+$_eptex --progname=eptex <$etestdir/trip2.in >xptrip.fot
sed "$P_SED1;$P_SED2" trip.log > xptrip.log
diff $testdir/trip.fot xptrip.fot
@@ -94,7 +101,7 @@
mv tripos.tex xptripos.tex
diff $testdir/tripos.tex xptripos.tex
-eval ../dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1
+eval $_dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ
mv trip.fmt xtrip.fmt
@@ -103,9 +110,9 @@
echo "*** e-TeX specific part of e-TRIP test for e-pTeX ***."
-../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
@@ -112,7 +119,7 @@
# get same filename in log
$LN_S $eptestdir/eptrip.tex etrip.tex
-../eptex --progname=epinitex --ini <$etestdir/etrip2.in >eptripin.fot
+$_eptex --progname=epinitex --ini <$etestdir/etrip2.in >eptripin.fot
if test ! -s etrip.fmt; then
echo "*** etrip.fmt not created by etrip2.in, investigate!" >&2
exit 1
@@ -121,7 +128,7 @@
diff $etestdir/etripin.log eptripin.log
# May as well test non-ini second time through.
-../eptex --progname=eptex <$etestdir/etrip3.in >eptrip.fot
+$_eptex --progname=eptex <$etestdir/etrip3.in >eptrip.fot
sed "$P_SED1;$P_SED2" etrip.log > eptrip.log
diff $etestdir/etrip.fot eptrip.fot
@@ -132,7 +139,7 @@
mv etrip.out eptrip.out
diff $etestdir/etrip.out eptrip.out
-eval ../dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1
+eval $_dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1
$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ
$is_OK || {
Modified: trunk/Build/source/texk/web2c/eptexdir/epver.test
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/epver.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/eptexdir/epver.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,13 +3,17 @@
# Copyright 2019 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_eptex=$BinDir/eptex$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
-./eptex -ini -etex -interaction batchmode -jobname epver1-log pver1.tex >epver1-term.log || exit 1
+$_eptex -ini -etex -interaction batchmode -jobname epver1-log pver1.tex >epver1-term.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
epver1-term.log >epver1-term_ed.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
@@ -17,13 +21,13 @@
diff epver1-term_ed.log epver1-log_ed.log || exit 2
# check consistency between runtime and version output
-./eptex -version >epver2-self.log || exit 1
+$_eptex -version >epver2-self.log || exit 1
sed -n '1 s/^\([-A-Za-z]*\) [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
epver2-self.log >epver2-self_ed.log || exit 1
diff epver1-term_ed.log epver2-self_ed.log || exit 4
# check consistency between version output and version primitives
-./eptex -ini -etex -interaction batchmode -jobname epver2-prim pver2.tex || exit 1
+$_eptex -ini -etex -interaction batchmode -jobname epver2-prim pver2.tex || exit 1
sed -n 's/^Engine \([-A-Za-z]*\) \([^ ]*\) \(.*\)/\1 \2/p' \
epver2-prim.log >epver2-prim_ed.log || exit 1
diff epver2-self_ed.log epver2-prim_ed.log || exit 8
Modified: trunk/Build/source/texk/web2c/eptexdir/pdfprimitive.test
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/pdfprimitive.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/eptexdir/pdfprimitive.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,10 @@
# Copyright 2015 Peter Breitenlohner <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_eptex=$BinDir/eptex$ExeExt
+
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
@@ -15,7 +19,7 @@
rm -f $FILE.*
$LN_S $srcdir/eptexdir/tests/pdfprimitive-test.tex $FILE.tex
-./eptex -ini -etex $FILE && exit 1
+$_eptex -ini -etex $FILE && exit 1
sed 1d $FILE.log >$FILE.out
Modified: trunk/Build/source/texk/web2c/eptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/wcfname.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/eptexdir/wcfname.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,14 +3,28 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
# You may freely use, modify and/or distribute this file.
-test -d eptests || mkdir -p eptests
-rm -f eptests/fn*.log eptests/fn*.txt eptests/fn*.tex fn*.tex
+engine=eptex
+testdir=eptests
-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=; err3=; err4=
+
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
-TEXINPUTS=eptests:.; 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=$?
@@ -29,21 +43,43 @@
LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE
fi
-perl $srcdir/tests/fn-generate.perl eptests
+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 128
+ exit 77
fi
# pTeX internal encoding
fenc="utf8"
-for ienc in euc sjis; do
+for ienc in $try_ienc; do
for doc in fn-$fenc fnさざ波-$fenc; do
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
- ./eptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >eptests/$doc-$ienc-term.log || rc=1
- mv $doc-$ienc.txt $doc-$ienc.log eptests/
- diff eptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
+ $_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
@@ -59,21 +95,33 @@
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
+ ienc="sjis"
else
- echo "*** We guess OS is not Windows."
if [ $fenc != sjis ]; then ienc="euc"; fi
fi
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
- ./eptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >eptests/$doc-$fenc-term.log || rc=3
- mv $doc-$ienc.txt $doc-$ienc.log eptests/
- diff eptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
+ $_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
Modified: trunk/Build/source/texk/web2c/euptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/ChangeLog 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/ChangeLog 2023-08-20 14:26:56 UTC (rev 67990)
@@ -1,3 +1,9 @@
+2023-08-20 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * am/euptex.am, {eptriptest,euptriptest,eupver,
+ pdfprimitive,wcfname,wcfname0}.test:
+ Make easier to test on Windows.
+
2023-03-29 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* wcfname.test:
Modified: trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/am/euptex.am 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/am/euptex.am 2023-08-20 14:26:56 UTC (rev 67990)
@@ -93,10 +93,10 @@
# e-upTeX Tests
#
-euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test
+euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test euptexdir/wcfname0.test
euptexdir/euptriptest.log euptexdir/eptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
euptexdir/pdfprimitive.log: euptex$(EXEEXT)
-euptexdir/eupver.log euptexdir/wcfname.log: euptex$(EXEEXT)
+euptexdir/eupver.log euptexdir/wcfname.log euptexdir/wcfname0.log: euptex$(EXEEXT)
EXTRA_DIST += $(euptex_tests)
Modified: trunk/Build/source/texk/web2c/euptexdir/eptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/eptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/eptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -6,6 +6,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-..}
+ExeExt=${ExeExt:-}
+_euptex=$BinDir/euptex$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
@@ -33,9 +40,9 @@
echo "*** TRIP test for e-pTeX 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
@@ -43,7 +50,7 @@
$LN_S $testdir/trip.tex .
rm -f trip.log
-../euptex --kanji-internal=euc --progname=epinitex --ini <$testdir/trip1.in >cptripin.fot
+$_euptex --kanji-internal=euc --progname=epinitex --ini <$testdir/trip1.in >cptripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by trip1.in, investigate!" >&2
exit 1
@@ -53,7 +60,7 @@
# May as well test non-ini second time through.
rm -f trip.log
-../euptex --kanji-internal=euc --progname=eptex <$testdir/trip2.in >cptrip.fot
+$_euptex --kanji-internal=euc --progname=eptex <$testdir/trip2.in >cptrip.fot
sed "$P_SED1;$P_SED2" trip.log > cptrip.log
diff $testdir/trip.fot cptrip.fot
@@ -64,7 +71,7 @@
mv tripos.tex cptripos.tex
diff $testdir/tripos.tex cptripos.tex
-eval ../dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1
+eval $_dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ
mv trip.fmt ctrip.fmt
@@ -74,7 +81,7 @@
echo "*** TRIP test for e-pTeX in extended mode ***."
rm -f trip.log
-../euptex --kanji-internal=euc --progname=epinitex --ini <$etestdir/etrip1.in >xptripin.fot
+$_euptex --kanji-internal=euc --progname=epinitex --ini <$etestdir/etrip1.in >xptripin.fot
if test ! -s trip.fmt; then
echo "*** trip.fmt not created by etrip1.in, investigate!" >&2
exit 1
@@ -84,7 +91,7 @@
# May as well test non-ini second time through.
rm -f trip.log
-../euptex --kanji-internal=euc --progname=eptex <$etestdir/trip2.in >xptrip.fot
+$_euptex --kanji-internal=euc --progname=eptex <$etestdir/trip2.in >xptrip.fot
sed "$P_SED1;$P_SED2" trip.log > xptrip.log
diff $testdir/trip.fot xptrip.fot
@@ -95,7 +102,7 @@
mv tripos.tex xptripos.tex
diff $testdir/tripos.tex xptripos.tex
-eval ../dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1
+eval $_dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ
mv trip.fmt xtrip.fmt
@@ -104,9 +111,9 @@
echo "*** e-TeX specific part of e-TRIP test for e-pTeX ***."
-../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
@@ -113,7 +120,7 @@
# get same filename in log
$LN_S $eptestdir/eptrip.tex etrip.tex
-../euptex --kanji-internal=euc --progname=epinitex --ini <$etestdir/etrip2.in >eptripin.fot
+$_euptex --kanji-internal=euc --progname=epinitex --ini <$etestdir/etrip2.in >eptripin.fot
if test ! -s etrip.fmt; then
echo "*** etrip.fmt not created by etrip2.in, investigate!" >&2
exit 1
@@ -122,7 +129,7 @@
diff $etestdir/etripin.log eptripin.log
# May as well test non-ini second time through.
-../euptex --kanji-internal=euc --progname=eptex <$etestdir/etrip3.in >eptrip.fot
+$_euptex --kanji-internal=euc --progname=eptex <$etestdir/etrip3.in >eptrip.fot
sed "$P_SED1;$P_SED2" etrip.log > eptrip.log
diff $etestdir/etrip.fot eptrip.fot
@@ -133,7 +140,7 @@
mv etrip.out eptrip.out
diff $etestdir/etrip.out eptrip.out
-eval ../dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1
+eval $_dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1
$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ
$is_OK || {
Modified: trunk/Build/source/texk/web2c/euptexdir/euptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/euptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/euptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,6 +5,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-..}
+ExeExt=${ExeExt:-}
+_euptex=$BinDir/euptex$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
@@ -104,9 +111,9 @@
echo "*** e-TeX specific part of e-TRIP test for e-upTeX ***."
-../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
@@ -113,7 +120,7 @@
# get same filename in log
$LN_S $eptestdir/eptrip.tex etrip.tex
-../euptex --progname=eupinitex --ini <$etestdir/etrip2.in >euptripin.fot
+$_euptex --progname=eupinitex --ini <$etestdir/etrip2.in >euptripin.fot
if test ! -s etrip.fmt; then
echo "*** etrip.fmt not created by etrip2.in, investigate!" >&2
exit 1
@@ -122,7 +129,7 @@
diff $etestdir/etripin.log euptripin.log
# May as well test non-ini second time through.
-../euptex --progname=euptex <$etestdir/etrip3.in >euptrip.fot
+$_euptex --progname=euptex <$etestdir/etrip3.in >euptrip.fot
sed "$P_SED1;$P_SED2" etrip.log > euptrip.log
diff $etestdir/etrip.fot euptrip.fot
@@ -133,7 +140,7 @@
mv etrip.out euptrip.out
diff $etestdir/etrip.out euptrip.out
-eval ../dvitype $dvitype_args etrip.dvi >euptrip.typ || exit 1
+eval $_dvitype $dvitype_args etrip.dvi >euptrip.typ || exit 1
$DIFF $DIFFFLAGS $etestdir/etrip.typ euptrip.typ
$is_OK || {
Modified: trunk/Build/source/texk/web2c/euptexdir/eupver.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/eupver.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/eupver.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,13 +3,17 @@
# Copyright 2019 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_euptex=$BinDir/euptex$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
-./euptex -ini -etex -interaction batchmode -jobname eupver1-log pver1.tex >eupver1-term.log || exit 1
+$_euptex -ini -etex -interaction batchmode -jobname eupver1-log pver1.tex >eupver1-term.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
eupver1-term.log >eupver1-term_ed.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
@@ -17,13 +21,13 @@
diff eupver1-term_ed.log eupver1-log_ed.log || exit 2
# check consistency between runtime and version output
-./euptex -version >eupver2-self.log || exit 1
+$_euptex -version >eupver2-self.log || exit 1
sed -n '1 s/^\([-A-Za-z]*\) [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
eupver2-self.log >eupver2-self_ed.log || exit 1
diff eupver1-term_ed.log eupver2-self_ed.log || exit 4
# check consistency between version output and version primitives
-./euptex -ini -etex -interaction batchmode -jobname eupver2-prim pver2.tex || exit 1
+$_euptex -ini -etex -interaction batchmode -jobname eupver2-prim pver2.tex || exit 1
sed -n 's/^Engine \([-A-Za-z]*\) \([^ ]*\) \(.*\)/\1 \2/p' \
eupver2-prim.log >eupver2-prim_ed.log || exit 1
diff eupver2-self_ed.log eupver2-prim_ed.log || exit 8
Modified: trunk/Build/source/texk/web2c/euptexdir/pdfprimitive.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/pdfprimitive.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/pdfprimitive.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,10 @@
# Copyright 2015 Peter Breitenlohner <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_euptex=$BinDir/euptex$ExeExt
+
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
@@ -15,7 +19,7 @@
rm -f $FILE.*
$LN_S $srcdir/eptexdir/tests/pdfprimitive-test.tex $FILE.tex
-./euptex -ini -etex $FILE && exit 1
+$_euptex -ini -etex $FILE && exit 1
sed 1d $FILE.log >$FILE.out
Modified: trunk/Build/source/texk/web2c/euptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/wcfname.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/euptexdir/wcfname.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,17 +3,32 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
# You may freely use, modify and/or distribute this file.
-test -d euptests || mkdir -p euptests
-rm -f euptests/fn*.log euptests/fn*.txt euptests/fn*.tex fn*.tex
+engine=euptex
+testdir=euptests
-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=euptests:.; 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,15 +43,28 @@
LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE
fi
-perl $srcdir/tests/fn-generate.perl euptests
+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
@@ -43,8 +71,7 @@
continue
fi
- if [ "$COMSPEC" != "" ]; then
- echo "*** We guess OS is Windows."
+ if [ $MyOS = Windows ]; then
if [ $ienc = uptex ]; then
command_line_encoding=utf8
export command_line_encoding
@@ -55,50 +82,24 @@
fi
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
- ./euptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >euptests/$doc-$ienc-term.log || rc=1
- mv $doc-$ienc.txt $doc-$ienc.log euptests/
- diff euptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
+ $_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 [ $pret = 239 ]; then
- echo "*** skip tests for Shift_JIS & EUC-JP."
- exit 0
+
+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
-
-
-# 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 [ $ienc = uptex ]; then
- command_line_encoding=utf8
- export command_line_encoding
- else
- 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
- ./euptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >euptests/$doc-$fenc-term.log || rc=3
- mv $doc-$ienc.txt $doc-$ienc.log euptests/
- diff euptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
-
-done
-done
-
-
exit $rc
Added: trunk/Build/source/texk/web2c/euptexdir/wcfname0.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/wcfname0.test (rev 0)
+++ trunk/Build/source/texk/web2c/euptexdir/wcfname0.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -0,0 +1,136 @@
+#! /bin/sh -vx
+#
+# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
+# You may freely use, modify and/or distribute this file.
+
+engine=euptex
+testdir=eup0tests
+
+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
Property changes on: trunk/Build/source/texk/web2c/euptexdir/wcfname0.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2023-08-20 14:26:56 UTC (rev 67990)
@@ -1,3 +1,8 @@
+2023-08-20 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * {ptriptest,pver,wcfname,zfmtcompress}.test:
+ Make easier to test on Windows.
+
2023-04-15 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
* ptex-base.ch: Update last_jchr in unpackage.
Modified: trunk/Build/source/texk/web2c/ptexdir/ptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ptexdir/ptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,13 @@
# Copyright 2010-2014 Peter Breitenlohner <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-..}
+ExeExt=${ExeExt:-}
+_ptex=$BinDir/ptex$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 @@
echo "*** TRIP test for pTeX ***."
-../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 @@
$LN_S $testdir/trip.tex .
rm -f trip.log
-../ptex --progname=pinitex --ini <$testdir/trip1.in >ptripin.fot
+$_ptex --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
@@ -50,7 +57,7 @@
# May as well test non-ini second time through.
rm -f trip.log
-../ptex --progname=ptex <$testdir/trip2.in >ptrip.fot
+$_ptex --progname=ptex <$testdir/trip2.in >ptrip.fot
sed "$P_SED1;$P_SED2" trip.log > ptrip.log
diff $testdir/trip.fot ptrip.fot
@@ -61,7 +68,7 @@
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 || {
Modified: trunk/Build/source/texk/web2c/ptexdir/pver.test
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/pver.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ptexdir/pver.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,13 +3,17 @@
# Copyright 2019 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_ptex=$BinDir/ptex$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
-./ptex -ini -interaction batchmode -jobname pver1-log pver1.tex >pver1-term.log || exit 1
+$_ptex -ini -interaction batchmode -jobname pver1-log pver1.tex >pver1-term.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
pver1-term.log >pver1-term_ed.log || exit 1
sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
@@ -17,13 +21,13 @@
diff pver1-term_ed.log pver1-log_ed.log || exit 2
# check consistency between runtime and version output
-./ptex -version >pver2-self.log || exit 1
+$_ptex -version >pver2-self.log || exit 1
sed -n '1 s/^\([-A-Za-z]*\) [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
pver2-self.log >pver2-self_ed.log || exit 1
diff pver1-term_ed.log pver2-self_ed.log || exit 4
# check consistency between version output and version primitives
-./ptex -ini -interaction batchmode -jobname pver2-prim pver2.tex || exit 1
+$_ptex -ini -interaction batchmode -jobname pver2-prim pver2.tex || exit 1
sed -n 's/^Engine \([-A-Za-z]*\) \([^ ]*\) \(.*\)/\1 \2/p' \
pver2-prim.log >pver2-prim_ed.log || exit 1
diff pver2-self_ed.log pver2-prim_ed.log || exit 8
Modified: trunk/Build/source/texk/web2c/ptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/wcfname.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ptexdir/wcfname.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,14 +3,28 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
# You may freely use, modify and/or distribute this file.
-test -d ptests || mkdir -p ptests
-rm -f ptests/fn*.log ptests/fn*.txt ptests/fn*.tex fn*.tex
+engine=ptex
+testdir=ptests
-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=; err3=; err4=
+
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
-TEXINPUTS=ptests:.; 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=$?
@@ -29,21 +43,43 @@
LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE
fi
-perl $srcdir/tests/fn-generate.perl ptests
+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 128
+ exit 77
fi
# pTeX internal encoding
fenc="utf8"
-for ienc in euc sjis; do
+for ienc in $try_ienc; do
for doc in fn-$fenc fnさざ波-$fenc; do
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
- ./ptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >ptests/$doc-$ienc-term.log || rc=1
- mv $doc-$ienc.txt $doc-$ienc.log ptests/
- diff ptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
+ $_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
@@ -59,21 +95,33 @@
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
+ ienc="sjis"
else
- echo "*** We guess OS is not Windows."
if [ $fenc != sjis ]; then ienc="euc"; fi
fi
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
- ./ptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >ptests/$doc-$fenc-term.log || rc=3
- mv $doc-$ienc.txt $doc-$ienc.log ptests/
- diff ptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
+ $_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
Modified: trunk/Build/source/texk/web2c/ptexdir/zfmtcompress.test
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/zfmtcompress.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/ptexdir/zfmtcompress.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,9 @@
# This test is intended to be used in a suitable temporary directory
# after installing all engines. It should not be enabled in build stage.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+
cat <<'EOF' > stress.tex
\let\origdump=\dump\let\dump\relax
\batchmode
@@ -39,14 +42,16 @@
test0() {
ENGINE=$1
echo $ENGINE
+ $_engine=$BinDir/$ENGINE$ExeExt
+ if [ ! -e $_engine ]; then return 0; fi
rm -f stress-$ENGINE.fmt test0.dvi test0.xdv &>/dev/null
- $ENGINE -ini -etex -progname=$ENGINE -jobname=stress-$ENGINE stress &>/dev/null
+ $_engine -ini -etex -progname=$ENGINE -jobname=stress-$ENGINE stress &>/dev/null
ls -l stress-$ENGINE.fmt
if [[ $ENGINE = "xetex" ]]; then
- $ENGINE -fmt=./stress-$ENGINE.fmt -no-pdf test0.tex &>/dev/null
+ $_engine -fmt=./stress-$ENGINE.fmt -no-pdf test0.tex &>/dev/null
ls -l test0.xdv
else
- $ENGINE -fmt=./stress-$ENGINE.fmt test0.tex &>/dev/null
+ $_engine -fmt=./stress-$ENGINE.fmt test0.tex &>/dev/null
ls -l test0.dvi
fi
}
@@ -76,14 +81,16 @@
test1() {
ENGINE=$1
echo $ENGINE
+ $_engine=$BinDir/$ENGINE$ExeExt
+ if [ ! -e $_engine ]; then return 0; fi
rm -f latex-$ENGINE.fmt test1.dvi test1.xdv &>/dev/null
- $ENGINE -ini -etex -progname=latex-dev -jobname=latex-$ENGINE latex.ini &>/dev/null
+ $_engine -ini -etex -progname=latex-dev -jobname=latex-$ENGINE latex.ini &>/dev/null
ls -l latex-$ENGINE.fmt
if [[ $ENGINE = "xetex" ]]; then
- $ENGINE -fmt=./latex-$ENGINE.fmt -no-pdf test1.tex &>/dev/null
+ $_engine -fmt=./latex-$ENGINE.fmt -no-pdf test1.tex &>/dev/null
ls -l test1.xdv
else
- $ENGINE -fmt=./latex-$ENGINE.fmt test1.tex &>/dev/null
+ $_engine -fmt=./latex-$ENGINE.fmt test1.tex &>/dev/null
ls -l test1.dvi
fi
}
Modified: trunk/Build/source/texk/web2c/tests/fn-generate.perl
===================================================================
--- trunk/Build/source/texk/web2c/tests/fn-generate.perl 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/tests/fn-generate.perl 2023-08-20 14:26:56 UTC (rev 67990)
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -s
#
# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
# You may freely use, modify and/or distribute this file.
@@ -9,6 +9,7 @@
use Encode;
my $st = 0;
+our $windows; # option -windows
foreach $_ (<DATA>) {
chomp;
@@ -29,6 +30,7 @@
my ($src);
my ($fnameT) = $fname0;
+ my $cmnt = $windows ? '%' : ''; # comment out if option -windows
$fnameT =~ s/\.tex$/-tmp.tex/;
$src = <<END;
@@ -48,7 +50,7 @@
\\immediate\\closeout1
% current directory
-\\input "|cat $fnameT"
+$cmnt\\input "|cat $fnameT"
\\input $fnameT
END
Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2023-08-20 14:26:56 UTC (rev 67990)
@@ -1,3 +1,11 @@
+2023-08-20 TANAKA Takuji <ttk at 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 at t-lab.opal.ne.jp>
* upbibtex.ch: Fix bug of substring$
Modified: trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/am/uptex.am 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/am/uptex.am 2023-08-20 14:26:56 UTC (rev 67990)
@@ -165,9 +165,9 @@
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 \
Modified: trunk/Build/source/texk/web2c/uptexdir/gkhuge.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/gkhuge.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/gkhuge.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,6 +3,11 @@
# Copyright 2018 Karl Berry <tex-live at 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 @@
# 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 @@
# 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
Modified: trunk/Build/source/texk/web2c/uptexdir/newjfm.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/newjfm.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/newjfm.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,6 +3,11 @@
# Copyright 2018 Karl Berry <tex-live at 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 @@
# 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
Modified: trunk/Build/source/texk/web2c/uptexdir/nissya.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/nissya.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/nissya.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -7,6 +7,10 @@
# Using data sent by Akira Kakuto <kakuto at 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 @@
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
Modified: trunk/Build/source/texk/web2c/uptexdir/ptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/ptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,6 +5,13 @@
# Copyright 2010-2014 Peter Breitenlohner <tex-live at 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 @@
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 @@
$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 @@
# 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 @@
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 || {
Modified: trunk/Build/source/texk/web2c/uptexdir/sample.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/sample.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/sample.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,6 +5,10 @@
# Copyright 2010-2013 Peter Breitenlohner <tex-live at 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 @@
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
Modified: trunk/Build/source/texk/web2c/uptexdir/skipjfmp.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/skipjfmp.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/skipjfmp.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,11 @@
# Copyright 2018 Karl Berry <tex-live at 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 @@
# 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
Modified: trunk/Build/source/texk/web2c/uptexdir/uparse.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uparse.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/uparse.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,6 +3,11 @@
# Copyright 2018 Karl Berry <tex-live at 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 @@
# 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 @@
# 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
Modified: trunk/Build/source/texk/web2c/uptexdir/upbibtex-mem.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upbibtex-mem.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/upbibtex-mem.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -7,6 +7,10 @@
# Using test data from Philipp Lehman <lehman at gmx.net>
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_upbibtex=$BinDir/upbibtex$ExeExt
+
test -d uptests || mkdir -p uptests
# Create bib data
@@ -65,7 +69,7 @@
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/tests \
BIBINPUTS=./uptests \
- ./upbibtex uptests/memtest$t || exit 1
+ $_upbibtex uptests/memtest$t || exit $t
done
Modified: trunk/Build/source/texk/web2c/uptexdir/upbibtex.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upbibtex.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/upbibtex.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,12 +4,16 @@
# Copyright 2011-2013 Peter Breitenlohner <tex-live at 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,33 +22,33 @@
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
@@ -51,27 +55,27 @@
## -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
Modified: trunk/Build/source/texk/web2c/uptexdir/updvitype.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/updvitype.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/updvitype.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,19 +5,25 @@
# Copyright 2011-2013 Peter Breitenlohner <tex-live at 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 @@
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
Modified: trunk/Build/source/texk/web2c/uptexdir/upkcat.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upkcat.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/upkcat.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,12 +3,16 @@
# Copyright 2022 TANAKA Takuji <ttk at 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
Modified: trunk/Build/source/texk/web2c/uptexdir/uppltotf.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uppltotf.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/uppltotf.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,7 +4,11 @@
# Copyright 2011-2013 Peter Breitenlohner <tex-live at 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
Modified: trunk/Build/source/texk/web2c/uptexdir/uptftopl.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptftopl.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/uptftopl.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,8 +4,12 @@
# Copyright 2011-2013 Peter Breitenlohner <tex-live at 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
Modified: trunk/Build/source/texk/web2c/uptexdir/uptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptriptest.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/uptriptest.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -4,6 +4,13 @@
# Copyright 2011-2014 Peter Breitenlohner <tex-live at 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 @@
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 @@
$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 @@
# 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 @@
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 || {
Modified: trunk/Build/source/texk/web2c/uptexdir/upver.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upver.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/upver.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,13 +3,17 @@
# Copyright 2019 Hironobu Yamashita <h.y.acetaminophen at 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 @@
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
Modified: trunk/Build/source/texk/web2c/uptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/wcfname.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/wcfname.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -3,17 +3,32 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue at 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,15 +43,28 @@
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
@@ -43,8 +71,7 @@
continue
fi
- if [ "$COMSPEC" != "" ]; then
- echo "*** We guess OS is Windows."
+ if [ $MyOS = Windows ]; then
if [ $ienc = uptex ]; then
command_line_encoding=utf8
export command_line_encoding
@@ -55,50 +82,24 @@
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
+ $_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 [ $pret = 239 ]; then
- echo "*** skip tests for Shift_JIS & EUC-JP."
- exit 0
+
+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
-
-
-# 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 [ $ienc = uptex ]; then
- command_line_encoding=utf8
- export command_line_encoding
- else
- 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
-
-done
-done
-
-
exit $rc
Added: trunk/Build/source/texk/web2c/uptexdir/wcfname0.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/wcfname0.test (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/wcfname0.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -0,0 +1,136 @@
+#! /bin/sh -vx
+#
+# Copyright 2022-2023 Japanese TeX Development Community <issue at 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
Property changes on: trunk/Build/source/texk/web2c/uptexdir/wcfname0.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/uptexdir/yokotate.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/yokotate.test 2023-08-19 23:47:26 UTC (rev 67989)
+++ trunk/Build/source/texk/web2c/uptexdir/yokotate.test 2023-08-20 14:26:56 UTC (rev 67990)
@@ -5,6 +5,11 @@
# Copyright 2013 Peter Breitenlohner <tex-live at 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 @@
# 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 @@
# 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
More information about the tex-live-commits
mailing list.