From a3b405e73b767f45adf6c785ff48f5206eeb4e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 8 Nov 2010 07:16:19 +0100 Subject: cctb: enhance test file --- luatexbase-cctb.dtx | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'luatexbase-cctb.dtx') diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx index 2e5f417..14702c5 100644 --- a/luatexbase-cctb.dtx +++ b/luatexbase-cctb.dtx @@ -508,6 +508,7 @@ end % Plain TeX. % % \begin{macrocode} +%\catcode00 15 %\input luatexbase-cctb.sty %\RequirePackage{luatexbase-cctb} %<*testplain,testlatex> @@ -527,13 +528,29 @@ end \lua{assert(luatexbase.catcodetables.anothercctb)} % \end{macrocode} % -% Now, play a little bit with predefined tables. +% Now, play a little bit with predefined tables. Be careful to change +% catcodes only inside a group to avoid chaos. % % \begin{macrocode} -\luatexcatcodetable\CatcodeTableLaTeXAtLetter -\ifnum\catcode64=11 \else \ERROR \fi -\luatexcatcodetable\CatcodeTableLaTeX -\ifnum\catcode64=12 \else \ERROR \fi +\def\test#1#2#3{% + \begingroup + \ifcsname CatcodeTable#1\endcsname \else \INTERR \fi + \luatexcatcodetable\csname CatcodeTable#1\endcsname + \ifnum\catcode#2=#3 \else \ERROR \fi + \endgroup} +\test {IniTeX} {00} {09} +\test {IniTeX} {92} {00} +\test {IniTeX} {64} {12} +\test {IniTeX} {65} {11} +\test {String} {92} {12} +\test {String} {65} {12} +\test {String} {32} {10} +\test {Other} {92} {12} +\test {Other} {65} {12} +\test {Other} {32} {12} +\test {LaTeXAtLetter} {64} {11} +\test {LaTeX} {64} {12} +\test {Expl} {32} {09} %\documentclass{minimal} \lua{% tex.sprint('\string\\setbox0=\string\\hbox{') -- cgit v1.2.3