summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
blob: da360ddb58563fd3d5e77cc78cdc06d7f6c1ebf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%%
%% This is file `test-cctb-latex.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatexbase-cctb.dtx  (with options: `testlatex')
%% 
%% See the aforementioned source file(s) for copyright and licensing information.
%% 
\catcode00 15
\RequirePackage{luatexbase-cctb}
\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}
\documentclass{minimal}
\lua{%
  tex.sprint('\string\\setbox0=\string\\hbox{')
  tex.sprint(luatexbase.catcodetables.string, "\string\\undef # _^&")
  tex.sprint('}')
  }
\stop
\endinput
%%
%% End of file `test-cctb-latex.tex'.