summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-09-18 13:21:43 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-09-18 13:21:43 +0000
commitde01a65eb905c4bd5f128b5a5ab21ca8303ac0ae (patch)
tree5ff886927408a7078a7138ca0aaad876f506781b /Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex
parent64c1ebb1c2d42898bd16b3cbdea28314a1a41013 (diff)
ptex-base.ch: frees table entry, if the default value is assigned globally (H. Kitagawa)
git-svn-id: svn://tug.org/texlive/trunk@45331 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex')
-rw-r--r--Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex46
1 files changed, 46 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex b/Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex
new file mode 100644
index 00000000000..bece61cd0c6
--- /dev/null
+++ b/Build/source/texk/web2c/ptexdir/tests/kinsoku_table.tex
@@ -0,0 +1,46 @@
+%#!uptex
+\newcount\fuga\newcount\dflt
+\iffalse
+ \global\let\prebreakpenalty=\inhibitxspcode
+ \fuga="30D3 \dflt=3
+\else
+ \fuga="3090 \dflt=0
+\fi
+
+\scrollmode
+\newcount\hoge\hoge="3000
+\loop\ifnum\hoge<\fuga
+ \message{\the\hoge}\prebreakpenalty\hoge=2
+ \advance\hoge 1\relax \repeat
+
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000>}% 2, D
+{
+ \prebreakpenalty"3001=\dflt\relax
+ \global\prebreakpenalty"4000=1\relax% error
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000>}% D, D
+}
+
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000>}% 2, D
+
+{
+ \global\prebreakpenalty"3001=\dflt\relax
+ \prebreakpenalty"4000=1\relax% no error
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000>}% D, 1
+}
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000>}% D, D
+
+\prebreakpenalty"4000=1\relax% no error
+
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000,
+ \the\prebreakpenalty"3549>}% D, 1, D
+
+\prebreakpenalty"4000=\dflt\relax
+
+\prebreakpenalty"3549=1\relax% no error
+
+\message{<\the\prebreakpenalty"3001, \the\prebreakpenalty"4000,
+ \the\prebreakpenalty"3549>}% D, D, 1
+
+
+\end
+