diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-08 07:16:19 +0100 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-11 15:53:11 +0100 |
commit | a3b405e73b767f45adf6c785ff48f5206eeb4e26 (patch) | |
tree | 698922ed6c638dd06dc19d8d2d8051905104b2a6 | |
parent | 56621dd318ee45d055ca94eed8ff4cdd2cab73aa (diff) | |
download | luatexbase-a3b405e73b767f45adf6c785ff48f5206eeb4e26.tar.gz |
cctb: enhance test file
-rw-r--r-- | luatexbase-cctb.dtx | 27 |
1 files changed, 22 insertions, 5 deletions
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} +%<testplain,testlatex>\catcode00 15 %<testplain>\input luatexbase-cctb.sty %<testlatex>\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} %<testlatex>\documentclass{minimal} \lua{% tex.sprint('\string\\setbox0=\string\\hbox{') |