%%
%% This is file `test-cctb-plain.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatexbase-cctb.dtx  (with options: `testplain')
%% 
%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
%% 
%% This work is under the CC0 license.
%% See source file 'luatexbase-cctb.dtx' for details.
%% 
\catcode00 15
\input luatexbase-cctb.sty
\begingroup \catcode64 11 \global\let\lua\luatexbase@directlua \endgroup

\newluatexcatcodetable\testcctb
\lua{assert(luatexbase.catcodetables.testcctb)}
\begingroup
\escapechar64
\newluatexcatcodetable\anothercctb
\endgroup
\lua{assert(luatexbase.catcodetables.anothercctb)}
\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}
\lua{%
  tex.sprint('\string\\setbox0=\string\\hbox{')
  tex.sprint(luatexbase.catcodetables.string, "\string\\undef # _^&")
  tex.sprint('}')
  }
\bye
\endinput
%%
%% End of file `test-cctb-plain.tex'.
