diff options
Diffstat (limited to 'Build/source/texk/web2c/uptexdir')
16 files changed, 458 insertions, 18 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index 07d1a01c056..07ea884d7a7 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,15 @@ +2022-11-27 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * tests/{nissya,sample,skipjfmp,upbibtex-mem,updvitype,yokotate}.test, + upbibtex-{longline,openout}-test.pl, + tests/uptex[34].{tex,dvi}, tests/uptex[34]a.typ, am/uptex.am: + Add tests for pTeX compatible mode of tools for upTeX. + upbibtex -kanji=internal=euc :: pbibtex compatible + updvitype -kanji=utf8 :: pdvitype compatible + uppltotf -kanji=utf8 :: ppltotf compatible + uptftopl -kanji=utf8 :: ptftopl compatible + https://github.com/texjporg/tex-jp-build/issues/32 + 2022-11-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com> * uptex-m.ch: Adapt to ptex-base.ch. diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index c7a58d14b9c..2d6d0f5bc39 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -161,27 +161,34 @@ EXTRA_DIST += \ uptexdir/ChangeLog # upTeX Tests -uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test +uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) -uptexdir/upver.log: uptex$(EXEEXT) +uptexdir/upver.log uptexdir/upkcat.log: uptex$(EXEEXT) upweb_tests = \ uptexdir/upbibtex.test \ uptexdir/updvitype.test \ uptexdir/uppltotf.test \ - uptexdir/uptftopl.test \ - uptexdir/yokotate.test \ - uptexdir/newjfm.test \ - uptexdir/uparse.test \ - uptexdir/gkhuge.test \ - uptexdir/upkcat.test + uptexdir/uptftopl.test +## upBibTeX +upweb_tests += \ + uptexdir/upbibtex-openout-test.pl uptexdir/upbibtex-longline-test.pl \ + uptexdir/upbibtex-mem.test uptexdir/nissya.test +## upDviType +upweb_tests += \ + uptexdir/sample.test +# uppPLtoTF/upTFtoPL +upweb_tests += \ + uptexdir/yokotate.test uptexdir/skipjfmp.test \ + uptexdir/newjfm.test uptexdir/uparse.test uptexdir/gkhuge.test uptexdir/upbibtex.log: upbibtex$(EXEEXT) uptexdir/updvitype.log: updvitype$(EXEEXT) uptexdir/uppltotf.log: uppltotf$(EXEEXT) uptexdir/uptftopl.log: uptftopl$(EXEEXT) -uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT) -uptexdir/newjfm.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT) -uptexdir/uparse.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT) -uptexdir/gkhuge.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT) +uptexdir/upbibtex-openout-test.log uptexdir/upbibtex-longline-test.log \ + uptexdir/upbibtex-mem.log uptexdir/nissya.log: upbibtex$(EXEEXT) +uptexdir/sample.log: pdvitype$(EXEEXT) +uptexdir/yokotate.log uptexdir/skipjfmp.log \ + uptexdir/newjfm.log uptexdir/uparse.log uptexdir/gkhuge.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT) EXTRA_DIST += $(uptex_tests) $(upweb_tests) DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \ @@ -198,20 +205,29 @@ endif UPWEB ## Test data and results ## +## uptexdir/nissya.test +DISTCLEANFILES += uptests/nissya_bib.* ## uptexdir/upbibtex.test EXTRA_DIST += tests/enc-u.bbl tests/enc-eu.bbl tests/enc-su.bbl tests/enc-uu.bbl DISTCLEANFILES += uptests/xexampl.aux uptests/xexampl.bbl uptests/xexampl.blg \ uptests/xenc*.* +## uptexdir/upbibtex-mem.test +DISTCLEANFILES += uptests/memtest.bib uptests/memtest?.* ## uptexdir/updvitype.test -DISTCLEANFILES += uptests/xstory.dvityp uptests/xpagenum.typ +EXTRA_DIST += uptexdir/tests/uptex3.tex uptexdir/tests/uptex3.dvi \ + uptexdir/tests/uptex4.tex uptexdir/tests/uptex4.dvi \ + uptexdir/tests/uptex3a.typ uptexdir/tests/uptex4a.typ +DISTCLEANFILES += uptests/xstory.dvityp uptests/xpagenum.typ uptests/x*ptex[34]*.typ ## uptexdir/uppltotf.test DISTCLEANFILES += uptests/xcmr10.tfm ## uptexdir/uptftopl.test DISTCLEANFILES += uptests/xcmr10.pl +## ptexdir/sample.test +DISTCLEANFILES += uptests/xsample*.typ ## uptexdir/yokotate.test EXTRA_DIST += uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm EXTRA_DIST += uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm -DISTCLEANFILES += uptests/x*min10.* +DISTCLEANFILES += uptests/x*min10.* uptests/xchcode*.* ## uptexdir/newjfm.test EXTRA_DIST += uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm DISTCLEANFILES += uptests/xtestnewu.* @@ -221,6 +237,8 @@ DISTCLEANFILES += uptests/xuparse.* uptests/yuparse.* ## uptexdir/gkhuge.test EXTRA_DIST += uptexdir/tests/gkhugeok.tfm uptexdir/tests/gkhugeng.tfm uptexdir/tests/gkhugeng.err DISTCLEANFILES += uptests/ygkhuge*.* +## uptexdir/skipjfmp.test +DISTCLEANFILES += uptests/xskipjfmp.* ## uptexdir/uptriptest EXTRA_DIST += uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) diff --git a/Build/source/texk/web2c/uptexdir/nissya.test b/Build/source/texk/web2c/uptexdir/nissya.test new file mode 100755 index 00000000000..749450276b3 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/nissya.test @@ -0,0 +1,23 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2017 Karl Berry <tex-live@tug.org> +# Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +# Using data sent by Akira Kakuto <kakuto@fuk.kindai.ac.jp> + +test -d uptests || mkdir -p uptests + +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 + 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 + diff --git a/Build/source/texk/web2c/uptexdir/sample.test b/Build/source/texk/web2c/uptexdir/sample.test new file mode 100755 index 00000000000..295ef8302b4 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/sample.test @@ -0,0 +1,23 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2017-2020 Karl Berry <tex-live@tug.org> +# Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +test -d uptests || mkdir -p uptests + +tfmpath=`$KPSEWHICH cmbx10.tfm` || exit 77 + +tfmparent=`dirname "$tfmpath"` +tfmgrandparent=`dirname "$tfmparent"` + +# Test inputs +testdir=$srcdir/ptexdir/tests + +TEXMFCNF=$srcdir/../kpathsea \ + 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 new file mode 100755 index 00000000000..42b11e70aab --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/skipjfmp.test @@ -0,0 +1,22 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2018 Karl Berry <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +test -d uptests || mkdir -p uptests + +# Test inputs +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 && \ + 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 && \ + diff $testdir/$font.pl uptests/x$font.pl && echo || exit 1 + +done + diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex3.dvi b/Build/source/texk/web2c/uptexdir/tests/uptex3.dvi Binary files differnew file mode 100644 index 00000000000..2c4d4087002 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex3.dvi diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex3.tex b/Build/source/texk/web2c/uptexdir/tests/uptex3.tex new file mode 100644 index 00000000000..73e5b470566 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex3.tex @@ -0,0 +1,8 @@ +%#!uptex + +\font\jpy=umin10 +\jpy +☃の朝\par +二の字二の字の\par +下駄の跡 +\bye diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex3a.typ b/Build/source/texk/web2c/uptexdir/tests/uptex3a.typ new file mode 100644 index 00000000000..4adac16e26e --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex3a.typ @@ -0,0 +1,74 @@ +Options selected: + Starting page = * + Maximum number of pages = 1000000 + Output level = 4 (the works) + Resolution = 300.00000000 pixels per inch +numerator/denominator=25400000/473628672 +magnification=1000; 0.00006334 pixels per DVI unit +' TeX output 2022.11.23:2006' +Postamble starts at byte 228. +maxv=43725786, maxh=30785863, maxstackdepth=2, totalpages=1 +Font 62: umin10 (JFM)---loaded at size 655360 DVI units +Font 0: cmr10---loaded at size 655360 DVI units + +42: beginning of page 1 +87: push +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +88: down3 -917504 v:=0-917504=-917504, vv:=-58 +92: pop +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +93: down4 42152922 v:=0+42152922=42152922, vv:=2670 +98: push +level 0:(h=0,v=42152922,w=0,x=0,y=0,z=0,hh=0,vv=2670) +99: down4 -41497562 v:=42152922-41497562=655360, vv:=42 +104: push +level 1:(h=0,v=655360,w=0,x=0,y=0,z=0,hh=0,vv=42) +105: right3 1310720 h:=0+1310720=1310720, hh:=83 +[ ] +109: fntdef1 62: umin10 +131: fntnum62 current font is umin10 +132: set2 9731("2603) type=0 h:=1310720+630598=1941318, hh:=123 +135: set2 12398("306E) type=0 h:=1941318+630598=2571916, hh:=163 +138: set2 26397("671D) type=0 h:=2571916+630598=3202514, hh:=203 +[☃の朝] +141: pop +level 1:(h=0,v=655360,w=0,x=0,y=0,z=0,hh=0,vv=42) +142: y3 786432 v:=655360+786432=1441792, vv:=91 +146: push +level 1:(h=0,v=1441792,w=0,x=0,y=786432,z=0,hh=0,vv=91) +147: right3 1310720 h:=0+1310720=1310720, hh:=83 +151: set2 20108("4E8C) type=0 h:=1310720+630598=1941318, hh:=123 +154: set2 12398("306E) type=0 h:=1941318+630598=2571916, hh:=163 +157: set2 23383("5B57) type=0 h:=2571916+630598=3202514, hh:=203 +160: set2 20108("4E8C) type=0 h:=3202514+630598=3833112, hh:=243 +163: set2 12398("306E) type=0 h:=3833112+630598=4463710, hh:=283 +166: set2 23383("5B57) type=0 h:=4463710+630598=5094308, hh:=323 +169: set2 12398("306E) type=0 h:=5094308+630598=5724906, hh:=363 +[ 二の字二の字の] +172: pop +level 1:(h=0,v=1441792,w=0,x=0,y=786432,z=0,hh=0,vv=91) +173: y0 786432 v:=1441792+786432=2228224, vv:=141 +174: push +level 1:(h=0,v=2228224,w=0,x=0,y=786432,z=0,hh=0,vv=141) +175: right3 1310720 h:=0+1310720=1310720, hh:=83 +179: set2 19979("4E0B) type=0 h:=1310720+630598=1941318, hh:=123 +182: set2 39364("99C4) type=0 h:=1941318+630598=2571916, hh:=163 +185: set2 12398("306E) type=0 h:=2571916+630598=3202514, hh:=203 +188: set2 36321("8DE1) type=0 h:=3202514+630598=3833112, hh:=243 +[ 下駄の跡] +191: pop +level 1:(h=0,v=2228224,w=0,x=0,y=786432,z=0,hh=0,vv=141) +192: pop +level 0:(h=0,v=42152922,w=0,x=0,y=0,z=0,hh=0,vv=2670) +193: down3 1572864 v:=42152922+1572864=43725786, vv:=2770 +197: push +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=2770) +198: right4 15229091 h:=0+15229091=15229091, hh:=965 +[ ] +203: fntdef1 0: cmr10 +224: fntnum0 current font is cmr10 +225: setchar49 ("31) h:=15229091+327681=15556772, hh:=986 +[1] +226: pop +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=2770) +227: eop diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex4.dvi b/Build/source/texk/web2c/uptexdir/tests/uptex4.dvi Binary files differnew file mode 100644 index 00000000000..f94ce026811 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex4.dvi diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex4.tex b/Build/source/texk/web2c/uptexdir/tests/uptex4.tex new file mode 100644 index 00000000000..cb90a9f57c2 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex4.tex @@ -0,0 +1,9 @@ +%#!uptex + +\tate +\font\jpt=utmin10 +\jpt +☃の朝\par +二の字二の字の\par +下駄の跡 +\bye diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex4a.typ b/Build/source/texk/web2c/uptexdir/tests/uptex4a.typ new file mode 100644 index 00000000000..af68d72cc9b --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex4a.typ @@ -0,0 +1,77 @@ +Options selected: + Starting page = * + Maximum number of pages = 1000000 + Output level = 4 (the works) + Resolution = 300.00000000 pixels per inch +numerator/denominator=25400000/473628672 +magnification=1000; 0.00006334 pixels per DVI unit +' TeX output 2022.11.23:2006' +Postamble starts at byte 236. +maxv=30785863, maxh=43725786, maxstackdepth=2, totalpages=1 +pTeX DVI (id=3) +Font 62: utmin10 (JFM tate)---loaded at size 655360 DVI units +Font 0: cmr10---loaded at size 655360 DVI units + +42: beginning of page 1 +87: dir 1 +89: down4 -43725786 h:=0+43725786=43725786, hh:=2770 +94: push +level 0:(h=43725786,v=0,w=0,x=0,y=0,z=0,d=1,hh=2770,vv=0) +95: down3 -917504 h:=43725786+917504=44643290, hh:=2828 warning: |h|>43725786! +99: pop +level 0:(h=43725786,v=0,w=0,x=0,y=0,z=0,d=1,hh=2770,vv=0) +100: down4 42152922 h:=43725786-42152922=1572864, hh:=100 +105: push +level 0:(h=1572864,v=0,w=0,x=0,y=0,z=0,d=1,hh=100,vv=0) +106: down4 -41497562 h:=1572864+41497562=43070426, hh:=2728 +111: push +level 1:(h=43070426,v=0,w=0,x=0,y=0,z=0,d=1,hh=2728,vv=0) +112: right3 1310720 v:=0+1310720=1310720, vv:=83 +[ ] +116: fntdef1 62: utmin10 +139: fntnum62 current font is utmin10 +140: set2 9731("2603) type=0 v:=1310720+630598=1941318, vv:=123 +143: set2 12398("306E) type=0 v:=1941318+630598=2571916, vv:=163 +146: set2 26397("671D) type=0 v:=2571916+630598=3202514, vv:=203 +[☃の朝] +149: pop +level 1:(h=43070426,v=0,w=0,x=0,y=0,z=0,d=1,hh=2728,vv=0) +150: y3 786432 h:=43070426-786432=42283994, hh:=2678 +154: push +level 1:(h=42283994,v=0,w=0,x=0,y=786432,z=0,d=1,hh=2678,vv=0) +155: right3 1310720 v:=0+1310720=1310720, vv:=83 +159: set2 20108("4E8C) type=0 v:=1310720+630598=1941318, vv:=123 +162: set2 12398("306E) type=0 v:=1941318+630598=2571916, vv:=163 +165: set2 23383("5B57) type=0 v:=2571916+630598=3202514, vv:=203 +168: set2 20108("4E8C) type=0 v:=3202514+630598=3833112, vv:=243 +171: set2 12398("306E) type=0 v:=3833112+630598=4463710, vv:=283 +174: set2 23383("5B57) type=0 v:=4463710+630598=5094308, vv:=323 +177: set2 12398("306E) type=0 v:=5094308+630598=5724906, vv:=363 +[ 二の字二の字の] +180: pop +level 1:(h=42283994,v=0,w=0,x=0,y=786432,z=0,d=1,hh=2678,vv=0) +181: y0 786432 h:=42283994-786432=41497562, hh:=2628 +182: push +level 1:(h=41497562,v=0,w=0,x=0,y=786432,z=0,d=1,hh=2628,vv=0) +183: right3 1310720 v:=0+1310720=1310720, vv:=83 +187: set2 19979("4E0B) type=0 v:=1310720+630598=1941318, vv:=123 +190: set2 39364("99C4) type=0 v:=1941318+630598=2571916, vv:=163 +193: set2 12398("306E) type=0 v:=2571916+630598=3202514, vv:=203 +196: set2 36321("8DE1) type=0 v:=3202514+630598=3833112, vv:=243 +[ 下駄の跡] +199: pop +level 1:(h=41497562,v=0,w=0,x=0,y=786432,z=0,d=1,hh=2628,vv=0) +200: pop +level 0:(h=1572864,v=0,w=0,x=0,y=0,z=0,d=1,hh=100,vv=0) +201: down3 1572864 h:=1572864-1572864=0, hh:=0 +205: push +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,d=1,hh=0,vv=0) +206: right4 15229091 v:=0+15229091=15229091, vv:=965 +[ ] +211: fntdef1 0: cmr10 +232: fntnum0 current font is cmr10 +233: setchar49 ("31) v:=15229091+327681=15556772, vv:=986 +[1] +234: pop +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,d=1,hh=0,vv=0) +235: eop diff --git a/Build/source/texk/web2c/uptexdir/upbibtex-longline-test.pl b/Build/source/texk/web2c/uptexdir/upbibtex-longline-test.pl new file mode 100755 index 00000000000..00bab9496cf --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/upbibtex-longline-test.pl @@ -0,0 +1,37 @@ +#!/usr/bin/env perl +# +# Public domain. Originally written 2010, Karl Berry. +# Check that upbibtex does not break long strings (change in 2010). + +# srcdir = web2c (in the source tree) +BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); } +require "$srcdir/../tests/common-test.pl"; + +exit (&main ()); + +sub main +{ + # The blg and bbl file names are based on the aux name and cannot be + # overridden. We can't write to the aux (source) directory, though, + # because that's an absolute path and openout_any=p. Therefore, copy + # the input aux file to our working directory and rename it to avoid + # spurious parallel test failures. + &test_file_copy ("$srcdir/tests/longline.aux", "./uplongline.aux"); + + # Run upBibTeX, quit if it fails. + my $ret = &test_run ("./upbibtex", "./uplongline.aux"); + return 1 if $ret != 0; + + # There should be lines longer than 80 chars in the output. + # (In older versions of upBibTeX, they are forcibly split, with a %.) + local *IN; + $IN = "uplongline.bbl"; + open (IN) || die "open($IN) failed: $!"; + while (<IN>) { + last if length ($_) >= 80; + } + + # We failed if all lines were < 80. + my $bad = ! (length $_ >= 80); + return $bad; +} diff --git a/Build/source/texk/web2c/uptexdir/upbibtex-mem.test b/Build/source/texk/web2c/uptexdir/upbibtex-mem.test new file mode 100755 index 00000000000..70473cd59c9 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/upbibtex-mem.test @@ -0,0 +1,70 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2017 Karl Berry <tex-live@tug.org> +# Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +# Using test data from Philipp Lehman <lehman@gmx.net> + +test -d uptests || mkdir -p uptests + +# Create bib data +mk_bib () { + for i + do + for j in 0 1 2 3 4 5 6 7 8 9; do + for k in 0 1 2 3 4 5 6 7 8 9; do + for l in 0 1 2 3 4 5 6 7 8 9; do + cat <<EOF +@Type{key$i$j$k$l, + field001 = {Value 001}, + field002 = {Value 002}, + field003 = {Value 003}, + field004 = {Value 004}, + field005 = {Value 005}, + field006 = {Value 006}, + field007 = {Value 007}, + field008 = {Value 008}, + field009 = {Value 009}, + field010 = {Value 010} +} + +EOF + done + done + done + done +} + +# Create aux data +mk_aux () { + cat <<EOF +\relax +\citation{*} +\bibstyle{$1} +\bibdata{memtest} +EOF +} + +for t in 1 2 3; do + + mk_aux memdata$t >uptests/memtest$t.aux + + env= + + case $t in + 1) mk_bib 0 >uptests/memtest.bib;; + 2) mk_bib 1 >>uptests/memtest.bib;; + 3) env='ent_str_size=2000 glob_str_size=2000';; + esac + + echo "Running memtest$t ..." + + eval $env \ + TEXMFCNF=$srcdir/../kpathsea \ + BSTINPUTS=$srcdir/tests \ + BIBINPUTS=./uptests \ + ./upbibtex uptests/memtest$t || exit 1 + +done + diff --git a/Build/source/texk/web2c/uptexdir/upbibtex-openout-test.pl b/Build/source/texk/web2c/uptexdir/upbibtex-openout-test.pl new file mode 100755 index 00000000000..cb0b7f3ef9b --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/upbibtex-openout-test.pl @@ -0,0 +1,22 @@ +#!/usr/bin/env perl +# +# Public domain. Originally written 2010, Karl Berry. +# Check that upbibtex respects openout_any. + +# srcdir = web2c (in the source tree) +BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); } +require "$srcdir/../tests/common-test.pl"; + +exit (&main ()); + +sub main +{ + $ENV{"openout_any"} = "p"; # should already be in texmf.cnf, but ... + + # .blg open of abs path should fail: + my $ret = &test_run ("./upbibtex", "$srcdir/tests/exampl.aux"); + + # The test fails if the program succeeded. Could also check the output. + my $bad = ($ret == 0); + return $bad; +} diff --git a/Build/source/texk/web2c/uptexdir/updvitype.test b/Build/source/texk/web2c/uptexdir/updvitype.test index 191b01eca15..2db8ef4c7e3 100755 --- a/Build/source/texk/web2c/uptexdir/updvitype.test +++ b/Build/source/texk/web2c/uptexdir/updvitype.test @@ -16,5 +16,23 @@ fi TEXMFCNF=$srcdir/../kpathsea \ TFMFONTS=$srcdir/tests \ - ./updvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >uptests/xpagenum.typ || exit 1 + ./updvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >uptests/xpagenum.typ || exit 2 + +TEXMFCNF=$srcdir/../kpathsea +TFMFONTS=$srcdir/ptexdir/tests:$srcdir/uptexdir/tests:$srcdir/tests +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 + 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 +done +done + +for doc in uptex3 uptex4; do + ./updvitype $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc.typ || exit 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 +done diff --git a/Build/source/texk/web2c/uptexdir/yokotate.test b/Build/source/texk/web2c/uptexdir/yokotate.test index 82fce7d0c60..87f32eb1ea6 100755 --- a/Build/source/texk/web2c/uptexdir/yokotate.test +++ b/Build/source/texk/web2c/uptexdir/yokotate.test @@ -6,6 +6,9 @@ test -d uptests || mkdir -p uptests +TEXMFCNF=$srcdir/../kpathsea +export TEXMFCNF + # Test inputs testdir=$srcdir/uptexdir/tests @@ -15,9 +18,33 @@ for font in umin10 utmin10; do ./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 + +# Test inputs +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 && \ + cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 3 + + ./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 && \ + cmp $testdir/$font.tfm uptests/x$font-$enc.tfm && echo || exit 5 + + ./uptftopl -kanji=$enc $testdir/$font.tfm uptests/x$font-$enc.pl && \ + if [ $enc = utf8 ]; then \ + sed -i".bak" -e "y/―~∥-¢£¬/—〜‖−¢£¬/" uptests/x$font-$enc.pl; fi && \ + diff $testdir/$font-$enc.pl uptests/x$font-$enc.pl && echo || exit 6 + +done +done |