summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-08-20 14:26:56 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-08-20 14:26:56 +0000
commitbb71bbacb80842b9b3b2e65484493437222f7f34 (patch)
treeb265db45eb108b13b1ce7c6fa3df0fd8a7d90e19
parentf5a9767f0c69c3e2d9f6c557b14d65bf2cfea1b1 (diff)
{,e}{,u}ptex: Make easier to test on Windows
git-svn-id: svn://tug.org/texlive/trunk@67990 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/ChangeLog1
-rw-r--r--Build/source/texk/web2c/Makefile.in38
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog5
-rwxr-xr-xBuild/source/texk/web2c/eptexdir/eptriptest.test33
-rwxr-xr-xBuild/source/texk/web2c/eptexdir/epver.test12
-rwxr-xr-xBuild/source/texk/web2c/eptexdir/pdfprimitive.test6
-rwxr-xr-xBuild/source/texk/web2c/eptexdir/wcfname.test82
-rw-r--r--Build/source/texk/web2c/euptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/euptexdir/am/euptex.am4
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/eptriptest.test33
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/euptriptest.test17
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/eupver.test12
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/pdfprimitive.test6
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/wcfname.test101
-rwxr-xr-xBuild/source/texk/web2c/euptexdir/wcfname0.test136
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog5
-rwxr-xr-xBuild/source/texk/web2c/ptexdir/ptriptest.test17
-rwxr-xr-xBuild/source/texk/web2c/ptexdir/pver.test12
-rwxr-xr-xBuild/source/texk/web2c/ptexdir/wcfname.test82
-rwxr-xr-xBuild/source/texk/web2c/ptexdir/zfmtcompress.test19
-rwxr-xr-xBuild/source/texk/web2c/tests/fn-generate.perl6
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog8
-rw-r--r--Build/source/texk/web2c/uptexdir/am/uptex.am4
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/gkhuge.test13
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/newjfm.test11
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/nissya.test8
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/ptriptest.test17
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/sample.test8
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/skipjfmp.test9
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/uparse.test13
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/upbibtex-mem.test6
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/upbibtex.test28
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/updvitype.test20
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/upkcat.test8
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/uppltotf.test6
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/uptftopl.test6
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/uptriptest.test17
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/upver.test12
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/wcfname.test101
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/wcfname0.test136
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/yokotate.test19
41 files changed, 807 insertions, 276 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index b516eba98b0..f0e34b42b85 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -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>
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 3797fef80f3..bd0b9752009 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -3548,21 +3548,21 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
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_LDADD = $(uptex_ldadd)
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 @@ euptex_ch_srcs = \
# 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.p: tangle$(EXEEXT) uptftopl.web uptexdir/uptftopl.ch
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 @@ euptex.ch: tie$(EXEEXT) euptex.web $(euptex_ch_srcs)
$(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
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog
index 08807a1ed5e..e38a09e7f34 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2023-08-20 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * {eptriptest,epver,pdfprimitive,wcfname}.test:
+ Make easier to test on Windows.
+
2023-03-29 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* wcfname.test:
diff --git a/Build/source/texk/web2c/eptexdir/eptriptest.test b/Build/source/texk/web2c/eptexdir/eptriptest.test
index 169ae16c6be..e74ba632932 100755
--- a/Build/source/texk/web2c/eptexdir/eptriptest.test
+++ b/Build/source/texk/web2c/eptexdir/eptriptest.test
@@ -5,6 +5,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live@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 @@ set -x
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 @@ diff $testdir/trip.pl trip.pl || is_OK=false
$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 @@ diff $testdir/tripin.log cptripin.log
# 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 @@ $DIFF $DIFFFLAGS $testdir/trip.log cptrip.log
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 @@ mv trip.fmt ctrip.fmt
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 @@ diff $testdir/tripin.log xptripin.log
# 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 @@ $DIFF $DIFFFLAGS $testdir/trip.log xptrip.log
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,16 +110,16 @@ mv trip.fmt xtrip.fmt
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
# 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 @@ sed "$P_SED1" etrip.log > eptripin.log || exit 1
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 @@ $DIFF $DIFFFLAGS $eptestdir/eptrip.log eptrip.log
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 || {
diff --git a/Build/source/texk/web2c/eptexdir/epver.test b/Build/source/texk/web2c/eptexdir/epver.test
index d2b8adc1f9e..6f3e42128ad 100755
--- a/Build/source/texk/web2c/eptexdir/epver.test
+++ b/Build/source/texk/web2c/eptexdir/epver.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:-}
+_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 @@ sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
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
diff --git a/Build/source/texk/web2c/eptexdir/pdfprimitive.test b/Build/source/texk/web2c/eptexdir/pdfprimitive.test
index 3a06237ab33..2d23793faea 100755
--- a/Build/source/texk/web2c/eptexdir/pdfprimitive.test
+++ b/Build/source/texk/web2c/eptexdir/pdfprimitive.test
@@ -4,6 +4,10 @@
# Copyright 2015 Peter Breitenlohner <tex-live@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 @@ FILE=pdfprimitive-eptex
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
diff --git a/Build/source/texk/web2c/eptexdir/wcfname.test b/Build/source/texk/web2c/eptexdir/wcfname.test
index 7555df69310..ce448d9617e 100755
--- a/Build/source/texk/web2c/eptexdir/wcfname.test
+++ b/Build/source/texk/web2c/eptexdir/wcfname.test
@@ -3,13 +3,27 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue@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\$"
@@ -29,21 +43,43 @@ if [ $ret != 0 ]; then
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 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
+ 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
diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog
index 991a051add5..265a1c1ec61 100644
--- a/Build/source/texk/web2c/euptexdir/ChangeLog
+++ b/Build/source/texk/web2c/euptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-20 TANAKA Takuji <ttk@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@t-lab.opal.ne.jp>
* wcfname.test:
diff --git a/Build/source/texk/web2c/euptexdir/am/euptex.am b/Build/source/texk/web2c/euptexdir/am/euptex.am
index d9f16c93194..5d86f392371 100644
--- a/Build/source/texk/web2c/euptexdir/am/euptex.am
+++ b/Build/source/texk/web2c/euptexdir/am/euptex.am
@@ -93,10 +93,10 @@ EXTRA_DIST += \
# 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)
diff --git a/Build/source/texk/web2c/euptexdir/eptriptest.test b/Build/source/texk/web2c/euptexdir/eptriptest.test
index 5ea5510f7a6..b737b7e2de7 100755
--- a/Build/source/texk/web2c/euptexdir/eptriptest.test
+++ b/Build/source/texk/web2c/euptexdir/eptriptest.test
@@ -6,6 +6,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live@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 @@ set -x
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 @@ diff $testdir/trip.pl trip.pl || is_OK=false
$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 @@ diff $testdir/tripin.log cptripin.log
# 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 @@ $DIFF $DIFFFLAGS $testdir/trip.log cptrip.log
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 @@ mv trip.fmt ctrip.fmt
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 @@ diff $testdir/tripin.log xptripin.log
# 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 @@ $DIFF $DIFFFLAGS $testdir/trip.log xptrip.log
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,16 +111,16 @@ mv trip.fmt xtrip.fmt
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
# 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 @@ sed "$P_SED1" etrip.log > eptripin.log || exit 1
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 @@ $DIFF $DIFFFLAGS $eptestdir/eptrip.log eptrip.log
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 || {
diff --git a/Build/source/texk/web2c/euptexdir/euptriptest.test b/Build/source/texk/web2c/euptexdir/euptriptest.test
index 8ea344bf822..91d0a6af7b3 100755
--- a/Build/source/texk/web2c/euptexdir/euptriptest.test
+++ b/Build/source/texk/web2c/euptexdir/euptriptest.test
@@ -5,6 +5,13 @@
# Copyright 2010 Hironori Kitagawa <tex-live@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,16 +111,16 @@ mv trip.fmt xtrip.fmt
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
# 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 @@ sed "$P_SED1" etrip.log > euptripin.log || exit 1
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 @@ $DIFF $DIFFFLAGS $eptestdir/eptrip.log euptrip.log
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 || {
diff --git a/Build/source/texk/web2c/euptexdir/eupver.test b/Build/source/texk/web2c/euptexdir/eupver.test
index c2a9281618e..30e1d15b864 100755
--- a/Build/source/texk/web2c/euptexdir/eupver.test
+++ b/Build/source/texk/web2c/euptexdir/eupver.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:-}
+_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 @@ sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
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
diff --git a/Build/source/texk/web2c/euptexdir/pdfprimitive.test b/Build/source/texk/web2c/euptexdir/pdfprimitive.test
index 8c3f0bfaffa..0f3ee9808a0 100755
--- a/Build/source/texk/web2c/euptexdir/pdfprimitive.test
+++ b/Build/source/texk/web2c/euptexdir/pdfprimitive.test
@@ -4,6 +4,10 @@
# Copyright 2015 Peter Breitenlohner <tex-live@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 @@ FILE=pdfprimitive-euptex
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
diff --git a/Build/source/texk/web2c/euptexdir/wcfname.test b/Build/source/texk/web2c/euptexdir/wcfname.test
index a6952999edd..acfbddf0d34 100755
--- a/Build/source/texk/web2c/euptexdir/wcfname.test
+++ b/Build/source/texk/web2c/euptexdir/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 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,54 +43,35 @@ if [ $ret != 0 ]; then
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
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
- ./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
-
-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
- ./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
+ $_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/euptexdir/wcfname0.test b/Build/source/texk/web2c/euptexdir/wcfname0.test
new file mode 100755
index 00000000000..9aaa3d9157d
--- /dev/null
+++ b/Build/source/texk/web2c/euptexdir/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=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
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index bebd9cd80df..77e860e1f25 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2023-08-20 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * {ptriptest,pver,wcfname,zfmtcompress}.test:
+ Make easier to test on Windows.
+
2023-04-15 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* ptex-base.ch: Update last_jchr in unpackage.
diff --git a/Build/source/texk/web2c/ptexdir/ptriptest.test b/Build/source/texk/web2c/ptexdir/ptriptest.test
index 5a11c17a2e0..3c0388f960e 100755
--- a/Build/source/texk/web2c/ptexdir/ptriptest.test
+++ b/Build/source/texk/web2c/ptexdir/ptriptest.test
@@ -4,6 +4,13 @@
# Copyright 2010-2014 Peter Breitenlohner <tex-live@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 @@ set -x
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 @@ diff $testdir/trip.pl trip.pl || is_OK=false
$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 @@ diff $testdir/tripin.log ptripin.log
# 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 @@ $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/ptexdir/pver.test b/Build/source/texk/web2c/ptexdir/pver.test
index 682625fcae9..43e6b608353 100755
--- a/Build/source/texk/web2c/ptexdir/pver.test
+++ b/Build/source/texk/web2c/ptexdir/pver.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:-}
+_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 @@ sed -n 's/^This is \([-A-Za-z]*\), Version [^-]*-\([^ ]*\) \(.*\)/\1 \2/p' \
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
diff --git a/Build/source/texk/web2c/ptexdir/wcfname.test b/Build/source/texk/web2c/ptexdir/wcfname.test
index 734ee3dd40e..e53866f61d4 100755
--- a/Build/source/texk/web2c/ptexdir/wcfname.test
+++ b/Build/source/texk/web2c/ptexdir/wcfname.test
@@ -3,13 +3,27 @@
# Copyright 2022-2023 Japanese TeX Development Community <issue@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\$"
@@ -29,21 +43,43 @@ if [ $ret != 0 ]; then
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 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
+ 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
diff --git a/Build/source/texk/web2c/ptexdir/zfmtcompress.test b/Build/source/texk/web2c/ptexdir/zfmtcompress.test
index 49da1174f9b..35733a5d4ca 100755
--- a/Build/source/texk/web2c/ptexdir/zfmtcompress.test
+++ b/Build/source/texk/web2c/ptexdir/zfmtcompress.test
@@ -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 @@ EOF
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 @@ EOF
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
}
diff --git a/Build/source/texk/web2c/tests/fn-generate.perl b/Build/source/texk/web2c/tests/fn-generate.perl
index 0870a2c4224..b08cc1b345b 100755
--- a/Build/source/texk/web2c/tests/fn-generate.perl
+++ b/Build/source/texk/web2c/tests/fn-generate.perl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -s
#
# Copyright 2022-2023 Japanese TeX Development Community <issue@texjp.org>
# You may freely use, modify and/or distribute this file.
@@ -9,6 +9,7 @@ use 5.008;
use Encode;
my $st = 0;
+our $windows; # option -windows
foreach $_ (<DATA>) {
chomp;
@@ -29,6 +30,7 @@ sub make_str ($$;$) {
my ($src);
my ($fnameT) = $fname0;
+ my $cmnt = $windows ? '%' : ''; # comment out if option -windows
$fnameT =~ s/\.tex$/-tmp.tex/;
$src = <<END;
@@ -48,7 +50,7 @@ $src = <<END;
\\immediate\\closeout1
% current directory
-\\input "|cat $fnameT"
+$cmnt\\input "|cat $fnameT"
\\input $fnameT
END
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