texlive[65542] Build/source/texk/web2c: e(u)ptex: add new tests

commits+takuji at tug.org commits+takuji at tug.org
Sun Jan 15 06:09:04 CET 2023


Revision: 65542
          http://tug.org/svn/texlive?view=revision&revision=65542
Author:   takuji
Date:     2023-01-15 06:09:03 +0100 (Sun, 15 Jan 2023)
Log Message:
-----------
e(u)ptex: add new tests

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/Makefile.in
    trunk/Build/source/texk/web2c/eptexdir/am/eptex.am
    trunk/Build/source/texk/web2c/euptexdir/am/euptex.am

Added Paths:
-----------
    trunk/Build/source/texk/web2c/eptexdir/wcfname.test
    trunk/Build/source/texk/web2c/euptexdir/eptriptest.test
    trunk/Build/source/texk/web2c/euptexdir/wcfname.test

Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in	2023-01-15 05:08:58 UTC (rev 65541)
+++ trunk/Build/source/texk/web2c/Makefile.in	2023-01-15 05:09:03 UTC (rev 65542)
@@ -4487,7 +4487,7 @@
 
 # e-pTeX Tests
 #
-eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test
+eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test eptexdir/wcfname.test
 uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES)
 uptex_ldadd = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS)
 uptex_dependencies = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies)
@@ -4603,7 +4603,7 @@
 
 # e-upTeX Tests
 #
-euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test
+euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test
 
 # At the moment, these are the only man pages handled in the
 # conglomerated web2c/Makefile[.am]. (All the others are in man/.)
@@ -22082,7 +22082,7 @@
 	$(tie_c) eptex.web $(eptex_ch_srcs)
 eptexdir/eptriptest.log: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 eptexdir/pdfprimitive.log: eptex$(EXEEXT)
-eptexdir/epver.log: eptex$(EXEEXT)
+eptexdir/epver.log eptexdir/wcfname.log: eptex$(EXEEXT)
 eptrip.diffs: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 	$(triptrap_diffs) $@
 .PHONY: eptrip-clean
@@ -22191,7 +22191,7 @@
 # Generate euptex.ch
 euptex.ch: tie$(EXEEXT) euptex.web $(euptex_ch_srcs)
 	$(tie_c) euptex.web $(euptex_ch_srcs)
-euptexdir/euptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
+euptexdir/euptriptest.log euptexdir/eptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 euptexdir/pdfprimitive.log: euptex$(EXEEXT)
 euptexdir/eupver.log: euptex$(EXEEXT)
 euptrip.diffs: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)

Modified: trunk/Build/source/texk/web2c/eptexdir/am/eptex.am
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/am/eptex.am	2023-01-15 05:08:58 UTC (rev 65541)
+++ trunk/Build/source/texk/web2c/eptexdir/am/eptex.am	2023-01-15 05:09:03 UTC (rev 65542)
@@ -89,10 +89,10 @@
 
 # e-pTeX Tests
 #
-eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test
+eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test eptexdir/wcfname.test
 eptexdir/eptriptest.log: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 eptexdir/pdfprimitive.log: eptex$(EXEEXT)
-eptexdir/epver.log: eptex$(EXEEXT)
+eptexdir/epver.log eptexdir/wcfname.log: eptex$(EXEEXT)
 
 EXTRA_DIST += $(eptex_tests)
 

Added: trunk/Build/source/texk/web2c/eptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/wcfname.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/eptexdir/wcfname.test	2023-01-15 05:09:03 UTC (rev 65542)
@@ -0,0 +1,68 @@
+#! /bin/sh -vx
+#
+# 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
+
+rc=0
+
+TEXMFCNF=$srcdir/../kpathsea
+TEXINPUTS=eptests:.
+export TEXMFCNF TEXINPUTS
+
+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=$?
+  if [ $ret = 0 ]; then
+    LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE
+    break
+  fi
+done
+if [ $ret = 1 ]; 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
+
+perl $srcdir/tests/fn-generate.perl || exit 128
+mv fn*.tex eptests/
+
+# pTeX internal encoding
+fenc="utf8"
+for ienc in euc sjis; 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 fn*-tmp.tex eptests/
+  diff eptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
+
+done
+done
+
+
+# pTeX, 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
+  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 fn*-tmp.tex eptests/
+  diff eptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
+
+done
+done
+
+
+exit $rc


Property changes on: trunk/Build/source/texk/web2c/eptexdir/wcfname.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2023-01-15 05:08:58 UTC (rev 65541)
+++ trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2023-01-15 05:09:03 UTC (rev 65542)
@@ -90,10 +90,10 @@
 
 # e-upTeX Tests
 #
-euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test
-euptexdir/euptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
+euptex_tests = euptexdir/euptriptest.test euptexdir/eptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test euptexdir/wcfname.test
+euptexdir/euptriptest.log euptexdir/eptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 euptexdir/pdfprimitive.log: euptex$(EXEEXT)
-euptexdir/eupver.log: euptex$(EXEEXT)
+euptexdir/eupver.log euptexdir/wcfname.log: euptex$(EXEEXT)
 
 EXTRA_DIST += $(euptex_tests)
 

Added: trunk/Build/source/texk/web2c/euptexdir/eptriptest.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/eptriptest.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/euptexdir/eptriptest.test	2023-01-15 05:09:03 UTC (rev 65542)
@@ -0,0 +1,143 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2022-2023 Japanese TeX Development Community <issue at texjp.org>
+# Copyright 2017-2018 Karl Berry <tex-live at tug.org>
+# Copyright 2011-2014 Peter Breitenlohner <tex-live at tug.org>
+# Copyright 2010 Hironori Kitagawa <tex-live at tug.org>
+# You may freely use, modify and/or distribute this file.
+
+LC_ALL=C; export LC_ALL;  LANGUAGE=C; export LANGUAGE
+
+testdir=$abs_srcdir/triptrap
+etestdir=$abs_srcdir/etexdir/etrip
+eptestdir=$abs_srcdir/eptexdir/eptrip
+
+TEXMFCNF=$eptestdir; export TEXMFCNF
+
+rm -rf eupptripdir
+mkdir eupptripdir
+cd eupptripdir
+
+dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'"
+
+echo ">>> Running e-TRIP test for e-upTeX-euc." >&2
+echo ">>> See $eptestdir/eptrip.diffs for example of acceptable diffs." >&2
+
+# pTeX outputs direction of boxes.
+P_SED1='s/, yoko direction//;s/yoko direction, //'
+P_SED2='s/yoko(math) direction, //'
+
+is_OK=:
+
+set -x
+
+echo "*** TRIP test for e-pTeX in compatibility mode ***."
+
+../pltotf $testdir/trip.pl trip.tfm || exit 1
+
+../tftopl ./trip.tfm trip.pl || exit 1
+
+diff $testdir/trip.pl trip.pl || is_OK=false
+
+# get same filename in log
+$LN_S $testdir/trip.tex .
+
+rm -f trip.log
+../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
+fi
+sed "$P_SED1" trip.log >  cptripin.log || exit 1
+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
+sed "$P_SED1;$P_SED2" trip.log > cptrip.log
+diff $testdir/trip.fot cptrip.fot
+
+# We use $DIFF instead of `diff' only for those files where there
+# might actually be legitimate numerical differences.
+$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
+$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ
+
+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
+if test ! -s trip.fmt; then
+  echo "*** trip.fmt not created by etrip1.in, investigate!" >&2
+  exit 1
+fi
+sed "$P_SED1" trip.log >  xptripin.log || exit 1
+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
+sed "$P_SED1;$P_SED2" trip.log > xptrip.log
+diff $testdir/trip.fot xptrip.fot
+
+# We use $DIFF instead of `diff' only for those files where there
+# might actually be legitimate numerical differences.
+$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
+$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ
+
+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
+
+../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
+if test ! -s etrip.fmt; then
+  echo "*** etrip.fmt not created by etrip2.in, investigate!" >&2
+  exit 1
+fi
+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
+sed "$P_SED1;$P_SED2" etrip.log > eptrip.log
+diff $etestdir/etrip.fot eptrip.fot
+
+# We use $DIFF instead of `diff' only for those files where there
+# might actually be legitimate numerical differences.
+$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
+$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ
+
+$is_OK || {
+  echo ">>> There were some errors." >&2
+  exit 1
+}
+


Property changes on: trunk/Build/source/texk/web2c/euptexdir/eptriptest.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/euptexdir/wcfname.test
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/wcfname.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/euptexdir/wcfname.test	2023-01-15 05:09:03 UTC (rev 65542)
@@ -0,0 +1,94 @@
+#! /bin/sh -vx
+#
+# 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
+
+rc=0
+
+TEXMFCNF=$srcdir/../kpathsea
+TEXINPUTS=euptests:.
+export TEXMFCNF TEXINPUTS
+
+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=$?
+  if [ $ret = 0 ]; then
+    LC_ALL=$loc; LANGUAGE=$loc; export LC_ALL LANGUAGE
+    break
+  fi
+done
+if [ $ret = 1 ]; 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
+
+perl $srcdir/tests/fn-generate.perl || exit 128
+mv fn*.tex euptests/
+
+# upTeX internal encoding
+fenc="utf8"
+for ienc in euc sjis 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 fn*-tmp.tex euptests/
+  diff euptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
+
+done
+done
+
+
+# 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 fn*-tmp.tex euptests/
+  diff euptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
+
+done
+done
+
+
+exit $rc


Property changes on: trunk/Build/source/texk/web2c/euptexdir/wcfname.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property


More information about the tex-live-commits mailing list.