Skip to content

Commit

Permalink
uptexdir: tests for texjporg#49 (SKIP property in GLUEKERN)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Feb 2, 2018
1 parent 9a4fffa commit 2a91298
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 5 deletions.
13 changes: 8 additions & 5 deletions source/texk/web2c/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,7 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
ptexdir/tests/goth10.tfm ptexdir/tests/sample.dvi \
ptexdir/tests/min10.pl ptexdir/tests/min10.tfm \
ptexdir/tests/tmin10.pl ptexdir/tests/tmin10.tfm \
ptexdir/tests/skipjfmp.pl ptexdir/tests/skipjfmp.tfm \
ptexdir/ptrip/ptrip.diffs ptexdir/ptrip/texmf.cnf \
$(eptex_web_srcs) $(eptex_ch_srcs) eptexdir/eptex.defines \
eptexdir/ChangeLog eptexdir/Changes.txt eptexdir/README.txt \
Expand Down Expand Up @@ -2687,10 +2688,10 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
ptests/xexampl.blg ptests/memtest.bib ptests/memtest?.* \
ptests/xstory.dvityp ptests/xpagenum.typ ptests/xcmr10.tfm \
ptests/xcmr10.pl ptests/xsample.typ ptests/x*min10.* \
ptrip.diffs $(nodist_eptex_SOURCES) eptex.web eptex.ch \
eptex-web2c eptex.p eptex.pool eptex-tangle eptrip.diffs \
pdfprimitive-eptex.* $(nodist_uptex_SOURCES) uptex.web \
uptex.ch uptex-web2c uptex.p uptex.pool uptex-tangle \
ptests/xskipjfmp.* ptrip.diffs $(nodist_eptex_SOURCES) \
eptex.web eptex.ch eptex-web2c eptex.p eptex.pool eptex-tangle \
eptrip.diffs pdfprimitive-eptex.* $(nodist_uptex_SOURCES) \
uptex.web uptex.ch uptex-web2c uptex.p uptex.pool uptex-tangle \
$(upweb_programs:=.c) $(upweb_programs:=.h) \
$(upweb_programs:=.p) $(upweb_programs:=-web2c) \
$(upweb_programs:=.web) uptests/xexampl.aux \
Expand Down Expand Up @@ -3153,7 +3154,8 @@ pweb_tests = ptexdir/pbibtex.test ptexdir/pdvitype.test \
ptexdir/ppltotf.test ptexdir/ptftopl.test \
ptexdir/pbibtex-openout-test.pl \
ptexdir/pbibtex-longline-test.pl ptexdir/pbibtex-mem.test \
ptexdir/nissya.test ptexdir/sample.test ptexdir/yokotate.test
ptexdir/nissya.test ptexdir/sample.test ptexdir/yokotate.test \
ptexdir/skipjfmp.test
eptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/libmd5 \
$(am__append_135)

Expand Down Expand Up @@ -17453,6 +17455,7 @@ ptexdir/pdvitype.log ptexdir/sample.log: pdvitype$(EXEEXT)
ptexdir/ppltotf.log: ppltotf$(EXEEXT)
ptexdir/ptftopl.log: ptftopl$(EXEEXT)
ptexdir/yokotate.log: ppltotf$(EXEEXT) ptftopl$(EXEEXT)
ptexdir/skipjfmp.log: ppltotf$(EXEEXT) ptftopl$(EXEEXT)
ptrip.diffs: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
$(triptrap_diffs) $@
.PHONY: ptrip-clean
Expand Down
6 changes: 6 additions & 0 deletions source/texk/web2c/ptexdir/am/ptex.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## texk/web2c/ptexdir/am/ptex.am: Makefile fragment for pTeX.
##
## Copyright (C) 2016-2018 Karl Berry <[email protected]>
## Copyright (C) 2010-2015 Peter Breitenlohner <[email protected]>
## You may freely use, modify and/or distribute this file.

Expand Down Expand Up @@ -177,12 +178,14 @@ pweb_tests += ptexdir/pbibtex-openout-test.pl ptexdir/pbibtex-longline-test.pl
pweb_tests += ptexdir/pbibtex-mem.test ptexdir/nissya.test
pweb_tests += ptexdir/sample.test
pweb_tests += ptexdir/yokotate.test
pweb_tests += ptexdir/skipjfmp.test
ptexdir/pbibtex.log ptexdir/pbibtex-openout-test.log ptexdir/pbibtex-longline-test.log \
ptexdir/pbibtex-mem.log ptexdir/nissya.log: pbibtex$(EXEEXT)
ptexdir/pdvitype.log ptexdir/sample.log: pdvitype$(EXEEXT)
ptexdir/ppltotf.log: ppltotf$(EXEEXT)
ptexdir/ptftopl.log: ptftopl$(EXEEXT)
ptexdir/yokotate.log: ppltotf$(EXEEXT) ptftopl$(EXEEXT)
ptexdir/skipjfmp.log: ppltotf$(EXEEXT) ptftopl$(EXEEXT)

EXTRA_DIST += $(ptex_tests) $(pweb_tests)
DISTCLEANFILES += $(pweb_programs:=.c) $(pweb_programs:=.h) \
Expand Down Expand Up @@ -220,6 +223,9 @@ DISTCLEANFILES += ptests/xsample.typ
EXTRA_DIST += ptexdir/tests/min10.pl ptexdir/tests/min10.tfm
EXTRA_DIST += ptexdir/tests/tmin10.pl ptexdir/tests/tmin10.tfm
DISTCLEANFILES += ptests/x*min10.*
## ptexdir/skipjfmp.test
EXTRA_DIST += ptexdir/tests/skipjfmp.pl ptexdir/tests/skipjfmp.tfm
DISTCLEANFILES += ptests/xskipjfmp.*
## ptexdir/ptriptest
EXTRA_DIST += ptexdir/ptrip/ptrip.diffs ptexdir/ptrip/texmf.cnf
ptrip.diffs: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
Expand Down
22 changes: 22 additions & 0 deletions source/texk/web2c/ptexdir/skipjfmp.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /bin/sh -vx
# $Id$
# Copyright 2018 Karl Berry <[email protected]>
# You may freely use, modify and/or distribute this file.

test -d ptests || mkdir -p ptests

# Test inputs
testdir=$srcdir/ptexdir/tests

# Testing pPLtoTF/pTFtoPL for SKIP property in GLUEKERN.
for font in skipjfmp; do

./ppltotf -verbose $testdir/$font.pl ptests/x$font.tfm && \
cmp $testdir/$font.tfm ptests/x$font.tfm && echo || exit 1

TEXMFCNF=$srcdir/../kpathsea \
./ptftopl -charcode-format octal -verbose $testdir/$font.tfm ptests/x$font.pl && \
diff $testdir/$font.pl ptests/x$font.pl && echo || exit 1

done

159 changes: 159 additions & 0 deletions source/texk/web2c/ptexdir/tests/skipjfmp.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
(COMMENT THIS IS A KANJI FORMAT FILE)
(FAMILY JFM SKIP)
(FACE F MRR)
(CODINGSCHEME TEX KANJI TEXT)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 0)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.0)
(STRETCH R 0.1)
(SHRINK R 0.0)
(XHEIGHT R 1.0)
(QUAD R 1.0)
(EXTRASPACE R 0.25)
(EXTRASTRETCH R 0.2)
(EXTRASHRINK R 0.125)
)
(GLUEKERN
(LABEL O 0)
(GLUE O 1 R 0.5 R 0.0 R 0.0)
(GLUE O 2 R 0.5 R 0.0 R 0.01)
(GLUE O 6 R 0.5 R 0.0 R 0.02)
(GLUE O 3 R 0.25 R 0.0 R 0.03)
(GLUE O 4 R 0.25 R 0.0 R 0.04)
(STOP)
(LABEL O 1)
(GLUE O 4 R 0.25 R 0.0 R 0.05)
(SKIP D 19)
(LABEL O 2)
(GLUE O 3 R 0.25 R 0.0 R 0.06)
(SKIP D 16)
(LABEL O 3)
(GLUE O 1 R 0.25 R 0.0 R 0.07)
(GLUE O 2 R 0.25 R 0.0 R 0.08)
(GLUE O 6 R 0.25 R 0.0 R 0.09)
(GLUE O 0 R 0.25 R 0.0 R 0.1)
(SKIP D 4)
(LABEL O 4)
(GLUE O 0 R 0.25 R 0.0 R 0.11)
(GLUE O 1 R 0.25 R 0.0 R 0.12)
(GLUE O 2 R 0.25 R 0.0 R 0.13)
(GLUE O 6 R 0.25 R 0.0 R 0.14)
(GLUE O 3 R 0.5 R 0.0 R 0.15)
(GLUE O 4 R 0.5 R 0.0 R 0.16)
(GLUE O 5 R 0.25 R 0.0 R 0.17)
(STOP)
(LABEL O 5)
(KRN O 5 R 0.0)
(GLUE O 1 R 0.5 R 0.0 R 0.18)
(GLUE O 2 R 0.5 R 0.0 R 0.19)
(GLUE O 6 R 0.5 R 0.0 R 0.2)
(GLUE O 3 R 0.25 R 0.0 R 0.21)
(GLUE O 4 R 0.25 R 0.0 R 0.22)
(STOP)
(LABEL O 6)
(GLUE O 4 R 0.25 R 0.0 R 0.23)
(GLUE O 3 R 0.25 R 0.0 R 0.24)
(STOP)
)
(CHARSINTYPE O 1
J 214A
)
(CHARSINTYPE O 2
J 2156
)
(CHARSINTYPE O 3
J 2127
)
(CHARSINTYPE O 4
J 2128
)
(CHARSINTYPE O 5
J 2144
)
(CHARSINTYPE O 6
J 215A
)
(TYPE O 0
(CHARWD R 1.0)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 1 R 0.5 R 0.0 R 0.0)
(GLUE O 2 R 0.5 R 0.0 R 0.01)
(GLUE O 6 R 0.5 R 0.0 R 0.02)
(GLUE O 3 R 0.25 R 0.0 R 0.03)
(GLUE O 4 R 0.25 R 0.0 R 0.04)
)
)
(TYPE O 1
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 4 R 0.25 R 0.0 R 0.05)
(GLUE O 3 R 0.25 R 0.0 R 0.24)
)
)
(TYPE O 2
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 3 R 0.25 R 0.0 R 0.06)
(GLUE O 4 R 0.25 R 0.0 R 0.22)
)
)
(TYPE O 3
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 1 R 0.25 R 0.0 R 0.07)
(GLUE O 2 R 0.25 R 0.0 R 0.08)
(GLUE O 6 R 0.25 R 0.0 R 0.09)
(GLUE O 0 R 0.25 R 0.0 R 0.1)
(GLUE O 3 R 0.5 R 0.0 R 0.15)
(GLUE O 4 R 0.5 R 0.0 R 0.16)
(GLUE O 5 R 0.25 R 0.0 R 0.17)
)
)
(TYPE O 4
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 0 R 0.25 R 0.0 R 0.11)
(GLUE O 1 R 0.25 R 0.0 R 0.12)
(GLUE O 2 R 0.25 R 0.0 R 0.13)
(GLUE O 6 R 0.25 R 0.0 R 0.14)
(GLUE O 3 R 0.5 R 0.0 R 0.15)
(GLUE O 4 R 0.5 R 0.0 R 0.16)
(GLUE O 5 R 0.25 R 0.0 R 0.17)
)
)
(TYPE O 5
(CHARWD R 1.0)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(KRN O 5 R 0.0)
(GLUE O 1 R 0.5 R 0.0 R 0.18)
(GLUE O 2 R 0.5 R 0.0 R 0.19)
(GLUE O 6 R 0.5 R 0.0 R 0.2)
(GLUE O 3 R 0.25 R 0.0 R 0.21)
(GLUE O 4 R 0.25 R 0.0 R 0.22)
)
)
(TYPE O 6
(CHARWD R 0.5)
(CHARHT R 0.88)
(CHARDP R 0.12)
(COMMENT
(GLUE O 4 R 0.25 R 0.0 R 0.23)
(GLUE O 3 R 0.25 R 0.0 R 0.24)
)
)
33 changes: 33 additions & 0 deletions source/texk/web2c/ptexdir/tests/skipjfmp.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
\prebreakpenalty`…=0
\postbreakpenalty`「=0
\postbreakpenalty`【=0
\postbreakpenalty`(=0
\postbreakpenalty`:=0
\postbreakpenalty`;=0

\tracingonline1
\showboxdepth10000
\showboxbreadth10000

\font\x=jis\x
\setbox0=\hbox{あ…あ「あ【あ(あ:あ;あ}\showbox0
\box0

\font\y=skipjfmp at 9.62216pt\y
\setbox2=\hbox{あ…あ「あ【あ(あ:あ;あ}\showbox2
\box2

\newfam\mx
\newfam\my
\textfont\mx=\x \scriptfont\mx=\x \scriptscriptfont\mx=\x
\textfont\my=\y \scriptfont\my=\y \scriptscriptfont\my=\y

\jfam\mx
\setbox4=\hbox{$あ…あ「あ【あ(あ:あ;あ$}\showbox4
\box4

\jfam\my
\setbox6=\hbox{$あ…あ「あ【あ(あ:あ;あ$}\showbox6
\box6

\bye
Binary file added source/texk/web2c/ptexdir/tests/skipjfmp.tfm
Binary file not shown.

0 comments on commit 2a91298

Please sign in to comment.