summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
blob: 4904a085974bf74e37a61830c5a859d18c55d721 (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
%%
%% This is file `test-attr-latex.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatexbase-attr.dtx  (with options: `testlatex')
%% 
%% See the aforementioned source file(s) for copyright and licensing information.
%% 
\RequirePackage{luatexbase-attr}
\newluatexattribute\testattr
\setluatexattribute\testattr{1}
\ifnum\testattr=1 \else \ERROR \fi
\unsetluatexattribute\testattr
\ifnum\testattr<0 \else \ERROR \fi
\catcode64 11
\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
\luatexbase@directlua{luatexbase.new_attribute('luatestattr')}
\luatexbase@directlua{assert(luatexbase.attributes.luatestattr)}
\begingroup
\escapechar64
\newluatexattribute\anotherattr
\endgroup
\setluatexattribute\anotherattr{1}
\luatexbase@directlua{assert(luatexbase.attributes.anotherattr)}
\stop
\endinput
%%
%% End of file `test-attr-latex.tex'.