Skip to content

Commit

Permalink
uptexdir/uptex-noto.test: new tests (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Oct 20, 2024
1 parent 9a2c02e commit 2fef609
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 14 deletions.
19 changes: 10 additions & 9 deletions source/texk/web2c/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3304,6 +3304,7 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
uptexdir/tests/up-prim.tex uptexdir/tests/up-prim.log \
uptexdir/tests/lmr1.tex uptexdir/tests/up-lmr1.log \
uptexdir/tests/lmr2.tex uptexdir/tests/up-lmr2.log \
uptexdir/tests/noto1.tex uptexdir/tests/up-noto1.log \
$(euptex_web_srcs) $(euptex_ch_srcs) euptexdir/euptex.defines \
euptexdir/COPYRIGHT euptexdir/COPYRIGHT.jis \
euptexdir/ChangeLog euptexdir/EUPTEX.txt $(euptex_tests) \
Expand Down Expand Up @@ -3661,13 +3662,13 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu*.* \
uptests/xuparse.* uptests/yuparse.* uptests/ygkhuge*.* \
uptests/ygk256*.* uptests/xskipjfmp.* uptrip.diffs up-ofm.* \
up-prim.* up-lmr*.* $(nodist_euptex_SOURCES) euptex.web \
euptex.ch euptex-web2c euptex.p euptex.pool euptex-tangle \
euptrip.diffs pdfprimitive-euptex.* eup-ctrlsym.log \
eup-ctrlsym.out eup-ctrlsym.tex eup-endline*.* eup-jctrlsym*.* \
eup-pknj-*.* eup-postpena*.* eup-free_*.* eup-inhibitglue*.* \
eup-kinsoku*.* eup-ofm.* eup-prim.* eup-ucs*.* \
$(nodist_hitex_SOURCES) $(nodist_hishrink_SOURCES) \
up-prim.* up-lmr*.* up-noto*.* $(nodist_euptex_SOURCES) \
euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \
euptex-tangle euptrip.diffs pdfprimitive-euptex.* \
eup-ctrlsym.log eup-ctrlsym.out eup-ctrlsym.tex eup-endline*.* \
eup-jctrlsym*.* eup-pknj-*.* eup-postpena*.* eup-free_*.* \
eup-inhibitglue*.* eup-kinsoku*.* eup-ofm.* eup-prim.* \
eup-ucs*.* $(nodist_hitex_SOURCES) $(nodist_hishrink_SOURCES) \
$(nodist_histretch_SOURCES) hiformat-tangle hitex-tangle \
hello.log rule.log $(nodist_pdftex_SOURCES) pdftex-final.ch \
pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
Expand Down Expand Up @@ -4557,7 +4558,7 @@ uptex_tests = \
uptexdir/upkcat.test \
uptexdir/wcfname.test uptexdir/wcfname0.test \
uptexdir/uptex-ofm.test uptexdir/uptex-prim.test \
uptexdir/uptex-lmr.test
uptexdir/uptex-lmr.test uptexdir/uptex-noto.test

# uppPLtoTF/upTFtoPL
upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \
Expand Down Expand Up @@ -22133,7 +22134,7 @@ uptexdir/uptriptest.log uptexdir/ptriptest.log: \
uptexdir/upver.log uptexdir/upkcat.log \
uptexdir/wcfname.log uptexdir/wcfname0.log \
uptexdir/uptex-ofm.log uptexdir/uptex-prim.log \
uptexdir/uptex-lmr.log: uptex$(EXEEXT)
uptexdir/uptex-lmr.log uptexdir/uptex-noto.log: uptex$(EXEEXT)
uptexdir/upbibtex.log: upbibtex$(EXEEXT)
uptexdir/updvitype.log: updvitype$(EXEEXT)
uptexdir/uppltotf.log: uppltotf$(EXEEXT)
Expand Down
7 changes: 5 additions & 2 deletions source/texk/web2c/uptexdir/am/uptex.am
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ uptex_tests = \
uptexdir/upkcat.test \
uptexdir/wcfname.test uptexdir/wcfname0.test \
uptexdir/uptex-ofm.test uptexdir/uptex-prim.test \
uptexdir/uptex-lmr.test
uptexdir/uptex-lmr.test uptexdir/uptex-noto.test
uptexdir/uptriptest.log uptexdir/ptriptest.log: \
uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
uptexdir/upver.log uptexdir/upkcat.log \
uptexdir/wcfname.log uptexdir/wcfname0.log \
uptexdir/uptex-ofm.log uptexdir/uptex-prim.log \
uptexdir/uptex-lmr.log: uptex$(EXEEXT)
uptexdir/uptex-lmr.log uptexdir/uptex-noto.log: uptex$(EXEEXT)
upweb_tests = \
uptexdir/upbibtex.test \
uptexdir/updvitype.test \
Expand Down Expand Up @@ -280,6 +280,9 @@ DISTCLEANFILES += up-prim.*
EXTRA_DIST += uptexdir/tests/lmr1.tex uptexdir/tests/up-lmr1.log \
uptexdir/tests/lmr2.tex uptexdir/tests/up-lmr2.log
DISTCLEANFILES += up-lmr*.*
## uptexdir/uptex-noto.test
EXTRA_DIST += uptexdir/tests/noto1.tex uptexdir/tests/up-noto1.log
DISTCLEANFILES += up-noto*.*

uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
$(triptrap_diffs) $@
Expand Down
113 changes: 113 additions & 0 deletions source/texk/web2c/uptexdir/tests/noto1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
%!uptex

% Copyright 2024 Japanese TeX Development Community <[email protected]>
% You may freely use, modify and/or distribute this file.
%
\parindent=0pt
\spaceskip 0.32em plus 0.16em minus 0.14em

\kcatcode"A7=14
\kcatcode"C0=14
\kcatcode"100=14
\kcatcode"180=14
\kcatcode"370=14
\kcatcode"400=14
\kcatcode"1F00=14
\kcatcode"2000=14
\kcatcode"20A0=14
\kcatcode"2100=14
\kcatcode"2400=14
\kcatcode"2E00=14

\newcount\ChrA\newcount\ChrB
\def\SetCatCode#1{%
\loop\ifnum\ChrA<\ChrB
\catcode\ChrA=#1
\sfcode\ChrA=1000
\lccode\ChrA=\ChrA
\advance\ChrA 1\relax \repeat
}

\ChrA="A0 \ChrB="250 \SetCatCode{11}
\ChrA="370 \ChrB="530 \SetCatCode{11}
\ChrA="1F00 \ChrB="2000 \SetCatCode{11}
\ChrA="2000 \ChrB="2070 \SetCatCode{11}
\ChrA="20A0 \ChrB="20D0 \SetCatCode{11}
\ChrA="2100 \ChrB="2150 \SetCatCode{11}
\ChrA="2400 \ChrB="2440 \SetCatCode{11}
\ChrA="2E00 \ChrB="2E80 \SetCatCode{11}

\font in T1\ToneNotoSrfR=NotoSerif-Regular-lf-t1
\font in TS1\TSoneNotoSrfR=NotoSerif-Regular-lf-ts1
\font in LY1\LYoneNotoSrfR=NotoSerif-Regular-lf-ly1
\font in T2A\TtwoaNotoSrfR=NotoSerif-Regular-lf-t2a
\font in T2B\TtwobNotoSrfR=NotoSerif-Regular-lf-t2b
\font in T2C\TtwocNotoSrfR=NotoSerif-Regular-lf-t2c
\font in LGR\LgrNotoSrfR=NotoSerif-Regular-lf-lgr

\def\vs{\vskip 1.5ex}

\ToneNotoSrfR

Ă㥹 ĆćČč ĎďĐđ ĘęĚě Ğğ İıIJijȷ Ĺ弾Łł ŃńŇňŊŋ
ŐőŒœ ŔŕŘř ŚśŞşŠš ŢţŤť ŮůŰű Ÿ ŹźŻżŽž

{
\TSoneNotoSrfR

ƒ ‖†‡•‰‱※ ‽⸘ ₡₤₩₫€ ℃№™Ω℧␢
}
\vs

\hyphenation{svě-domím}
{
NotoSerif-Regular-lf-t1 in T1:
\ToneNotoSrfR

Všichni lidé rodí se svobodní a sobě rovní co do důstojnosti a práv.
Jsou nadáni rozumem a svědomím a mají spolu jednat v duchu bratrství.
}\vs

\hyphenation{sam-vit-tighed}
{
NotoSerif-Regular-lf-ly1 in LY1:
\LYoneNotoSrfR

Alle mennesker er født frie og lige i værdighed og rettigheder.
De er udstyret med fornuft og samvittighed, og de bør handle mod hverandre i en broderskabets ånd.
}\vs

{
NotoSerif-Regular-lf-t2a in T2A:
\TtwoaNotoSrfR

Cвa људскa бићa рaђajу сe слoбoднa и jeднaкa у дoстojaнству и прaвимa.
Oнa су oбдaрeнa рaзумoм и свeшћу и трeбajeдни прeмa другимa дa пoступajу у духу брaтствa.
}\vs

{
NotoSerif-Regular-lf-t2b in T2B:
\TtwobNotoSrfR

Усе людзi нараджаюцца свабоднымi i роўнымi ў сваёй годнасцi i правах.
Яны надзелены розумам i сумленнем i павiнны ставiцца адзiн да аднаго ў духу брацтва.
}\vs

{
NotoSerif-Regular-lf-t2c in T2C:
\TtwocNotoSrfR

Все люди рождаются свободными и равными в своем достоинстве и правах.
Они наделены разумом и совестью и должны поступать в отношении друг друга в духе братства.
}\vs

\hyphenation{αδελφο-σύνης προι-κι-σμέ-ν-οι}
{
NotoSerif-Regular-lf-lgr in LGR:
\LgrNotoSrfR

'Ολοι οι άνθρωποι γεννιούνται ελεύθεροι και ίσοι στην αξιοπρέπεια και τα δικαιώματα.
Είναι προικισμένοι με λογική και συνείδηση, και οφείλουν να συμπεριφέρονται μεταξύ τους με πνεύμα αδελφοσύνης.
}

\bye
8 changes: 8 additions & 0 deletions source/texk/web2c/uptexdir/tests/up-noto1.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
restricted \write18 enabled.
%&-line parsing enabled.
**up-noto1.tex
(./up-noto1.tex
\ChrA=\count26
\ChrB=\count27
[1] )
Output written on up-noto1.dvi (1 page, 2700 bytes).
4 changes: 3 additions & 1 deletion source/texk/web2c/uptexdir/uptex-lmr.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ TEXFORMATS=.; export TEXFORMATS

# get same filename in log
rm -f up-lmr*.*
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
$LN_S $srcdir/uptexdir/tests/lmr1.tex ./up-lmr1.tex
$LN_S $srcdir/uptexdir/tests/lmr2.tex ./up-lmr2.tex

if test ! -f ./up-basic.tex; then
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
fi
if test ! -f ./up-basic.fmt; then
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
$_uptex -ini up-basic || exit 1
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/uptexdir/uptex-m.ch
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
% (2022-12-09) HK Hironori Kitagawa fixed a bug in \char, \kchar.
% (2023-09-16) TTK upTeX u1.30
% (2024-09-30) TTK upTeX u1.35
% (2024-xx-xx) TTK upTeX u2.00
% (2024-10-20) TTK upTeX u2.00

@x
\def\pTeX{p\kern-.15em\TeX}
Expand Down
52 changes: 52 additions & 0 deletions source/texk/web2c/uptexdir/uptex-noto.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#! /bin/sh -vx
# Copyright 2024 Japanese TeX Development Community <[email protected]>
# You may freely use, modify and/or distribute this file.

KpsDir=${KpsDir:-../kpathsea}
BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_kpsewhich=$KpsDir/kpsewhich$ExeExt
_uptex=$BinDir/uptex$ExeExt

LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE

if type kpsewhich > /dev/null 2>&1; then
tfmpath=".//;"`kpsewhich -show-path=tfm`
tfmpath=`echo $tfmpath | sed -e 's,!!,,g'`
fi

TEXMFCNF=$srcdir/../kpathsea;export TEXMFCNF
OFMFONTS=".;$srcdir/tests"; export OFMFONTS
TEXINPUTS=".;$srcdir/tests"; export TEXINPUTS
TEXFORMATS=.; export TEXFORMATS

if type kpsewhich > /dev/null 2>&1; then
echo $tfmpath
else
tfmpath=".//;"`$_kpsewhich -show-path=tfm`
echo $tfmpath
fi
TFMFONTS=`$_kpsewhich "--cnf-line=TFMFONTS=$tfmpath" -show-path=tfm`
export TFMFONTS
echo "TFMFONTS::" $TFMFONTS

##### following tests require NOTO fonts #####

$_kpsewhich NotoSerif-Regular-lf-t1.tfm || exit 77

rm -f up-noto*.*
$LN_S $srcdir/uptexdir/tests/noto1.tex ./up-noto1.tex

if test ! -f ./up-basic.tex; then
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
fi
if test ! -f ./up-basic.fmt; then
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
$_uptex -ini up-basic || exit 1
fi

$_uptex -fmt=up-basic -interaction=batchmode up-noto1.tex || :

sed 1d up-noto1.log >up-noto1.out

diff $srcdir/uptexdir/tests/up-noto1.log up-noto1.out || exit 3
4 changes: 3 additions & 1 deletion source/texk/web2c/uptexdir/uptex-ofm.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ TEXFORMATS=.; export TEXFORMATS
rm -f up-ofm.* uptests/xup-ofm*
$LN_S $srcdir/uptexdir/tests/up-ofm.tex ./up-ofm.tex

if test ! -f ./up-basic.fmt; then
if test ! -f ./up-basic.tex; then
cp $srcdir/tests/dump-basic.tex ./up-basic.tex
fi
if test ! -f ./up-basic.fmt; then
$_uptex -ini up-basic || exit 1
fi

Expand Down

0 comments on commit 2fef609

Please sign in to comment.