From 98942ad29a1e59032eb5c75900d2a3df5402e2e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= <mpg@elzevir.fr>
Date: Sat, 27 Mar 2010 01:09:46 +0100
Subject: A bit more testing for cctb.

---
 luatexbase-cctb.dtx | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

(limited to 'luatexbase-cctb.dtx')

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
-- 
cgit v1.2.3

