summaryrefslogtreecommitdiff
path: root/luatexbase-cctb.dtx
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-27 01:09:46 +0100
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-27 01:09:46 +0100
commit98942ad29a1e59032eb5c75900d2a3df5402e2e1 (patch)
tree3a215f30115d02bc71f8ca9199475a2ce2d11aa2 /luatexbase-cctb.dtx
parent36010a4dbaaa94195a62c09c68d57e53ca0196b7 (diff)
downloadluatexbase-98942ad29a1e59032eb5c75900d2a3df5402e2e1.tar.gz
A bit more testing for cctb.
Diffstat (limited to 'luatexbase-cctb.dtx')
-rw-r--r--luatexbase-cctb.dtx27
1 files changed, 25 insertions, 2 deletions
diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx
index 310bb25..35aa95f 100644
--- a/luatexbase-cctb.dtx
+++ b/luatexbase-cctb.dtx
@@ -408,8 +408,7 @@ end
%
% The tests done are very basic: we just make sure that the package loads
% correctly and the macros don't generate any error, under both LaTeX en
-% Plain TeX. We also check that the catcodetable's number is remembered well,
-% independently of the current value of |\escapechar|.
+% Plain TeX.
%
% \begin{macrocode}
%<testplain>\input luatexbase-cctb.sty
@@ -417,11 +416,35 @@ end
%<*testplain,testlatex>
\newluatexcatcodetable\testcctb
\directlua{assert(luatextra.catcodetables.testcctb)}
+% \end{macrocode}
+%
+% Also check that the catcodetable's number is remembered well,
+% independently of the current value of |\escapechar|.
+
+% \begin{macrocode}
\begingroup
\escapechar64
\newluatexcatcodetable\anothercctb
\endgroup
\directlua{assert(luatextra.catcodetables.anothercctb)}
+% \end{macrocode}
+%
+% Now, play a little bit with predefined tables.
+%
+% \begin{macrocode}
+\luatexcatcodetable\CatcodeTableLaTeXAtLetter
+\ifnum\catcode64=11 \else \ERROR \fi
+\luatexcatcodetable\CatcodeTableLaTeX
+\ifnum\catcode64=12 \else \ERROR \fi
+%<testlatex>\documentclass{minimal}
+\directlua{%
+ tex.sprint('\string\\hbox{')
+ tex.sprint(luatextra.catcodetables.string, "\string\\undef # _^&")
+ tex.sprint('}')
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
%</testplain,testlatex>
%<testplain>\bye
%<testlatex>\stop