diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-26 23:22:39 +0100 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-26 23:22:39 +0100 |
commit | 548cf785083785c27869a8b035156dbe2c127c29 (patch) | |
tree | b9d552c32396326b72a142ff4e59bc9c29e1f3e3 | |
parent | 2bc1ebfb616b2c0ab2c97f0af33fe47e61178168 (diff) | |
download | luatexbase-548cf785083785c27869a8b035156dbe2c127c29.tar.gz |
Minimal test files for cctb.
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | luatexbase-attr.dtx | 2 | ||||
-rw-r--r-- | luatexbase-cctb.dtx | 46 |
4 files changed, 50 insertions, 10 deletions
@@ -2,6 +2,7 @@ 2010/03/26 luatexbase-cctb + - add minimal test files for luatex and lualatex 2010/03/11 luatexbase-attrs 0.1 @@ -11,6 +11,8 @@ UNPACKED_REGS = luatexbase-regs.sty \ test-regs-plain.tex test-regs-latex.tex UNPACKED_ATTR = luatexbase-attr.sty luatexbase.attr.lua \ test-attr-plain.tex test-attr-latex.tex +UNPACKED_CCTB = luatexbase-cctb.sty luatexbase.cctb.lua \ + test-cctb-plain.tex test-cctb-latex.tex UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) COMPILED = $(DOC) GENERATED = $(COMPILED) $(UNPACKED) @@ -42,7 +44,7 @@ DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) >/dev/null 2>&1 # Main targets definition all: $(GENERATED) -check: check-regs check-attr +check: check-regs check-attr check-cctb doc: $(COMPILED) unpack: $(UNPACKED) ctan: check $(CTAN_ZIP) @@ -64,6 +66,9 @@ $(UNPACKED_REGS): luatexbase-regs.dtx $(UNPACKED_ATTR): luatexbase-attr.dtx $(DO_TEX) +$(UNPACKED_CCTB): luatexbase-cctb.dtx + $(DO_TEX) + check-regs: $(UNPACKED_REGS) luatex --interaction=batchmode test-regs-plain.tex >/dev/null lualatex --interaction=batchmode test-regs-latex.tex >/dev/null @@ -72,6 +77,10 @@ check-attr: $(UNPACKED_ATTR) luatex --interaction=batchmode test-attr-plain.tex >/dev/null lualatex --interaction=batchmode test-attr-latex.tex >/dev/null +check-cctb: $(UNPACKED_CCTB) + luatex --interaction=batchmode test-cctb-plain.tex >/dev/null + lualatex --interaction=batchmode test-cctb-latex.tex >/dev/null + $(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP) @echo "Making $@ for CTAN upload." @$(RM) -- $@ diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx index 9f81fe9..77c97ab 100644 --- a/luatexbase-attr.dtx +++ b/luatexbase-attr.dtx @@ -304,7 +304,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 attribute's number is remembered well, -% independantly of the current value of |\escapechar|. +% independently of the current value of |\escapechar|. % % \begin{macrocode} %<testplain>\input luatexbase-attr.sty diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx index 14988bc..7ac8a2e 100644 --- a/luatexbase-cctb.dtx +++ b/luatexbase-cctb.dtx @@ -56,6 +56,12 @@ and the derived files \file{luatexbase-cctb.sty}{\from{luatexbase-cctb.dtx}{texpackage}}% } +\generate{% + \usedir{doc/luatex/luatexbase}% + \file{test-cctb-plain.tex}{\from{luatexbase-cctb.dtx}{testplain}}% + \file{test-cctb-latex.tex}{\from{luatexbase-cctb.dtx}{testlatex}}% +} + \def\MetaPrefix{-- } \def\luapostamble{% @@ -67,7 +73,7 @@ and the derived files \generate{% \usedir{tex/luatex/luatexbase}% - \file{cctb.lua}{\from{luatexbase-cctb.dtx}{luamodule}}% + \file{luatexbase.cctb.lua}{\from{luatexbase-cctb.dtx}{luamodule}}% } \obeyspaces @@ -207,7 +213,7 @@ and the derived files \global\advance\luatexcatcodetabledefcounter by 1\relax \allocationnumber=\luatexcatcodetabledefcounter \global\chardef#1=\allocationnumber - \luadirect{% + \directlua{% luatextra.catcodetabledef_from_tex([[\noexpand#1]], '\number\allocationnumber')}% \wlog{\string#1=\string\catcodetable\the\allocationnumber}% \else @@ -271,7 +277,7 @@ and the derived files \newluatexcatcodetable\CatcodeTableLaTeX \newluatexcatcodetable\CatcodeTableLaTeXAtLetter \newluatexcatcodetable\CatcodeTableExpl -\initluatexcatcodetable\CatcodeTableIniTeX +\luatexinitcatcodetable\CatcodeTableIniTeX \expandafter\ifx\csname @firstofone\endcsname\relax \long\def\@firstofone#1{#1}% @@ -296,9 +302,9 @@ and the derived files \catcode125=2 % brace right \catcode126=13 % tilde \catcode127=15 % - \saveluatexcatcodetable\CatcodeTableLaTeX + \luatexsavecatcodetable\CatcodeTableLaTeX \catcode64=11 % - \saveluatexcatcodetable\CatcodeTableLaTeXAtLetter + \luatexsavecatcodetable\CatcodeTableLaTeXAtLetter \endgroup \begingroup \luatexsetcatcoderange{0}{8}{15}% @@ -317,7 +323,7 @@ and the derived files \catcode125=2 % right brace is end-group character \catcode126=10 % tilde is a space char. \catcode127=15 % - \saveluatexcatcodetable\CatcodeTableExpl + \luatexsavecatcodetable\CatcodeTableExpl \endgroup \@makeother{0}% nul \@makeother{13}% carriage return @@ -326,9 +332,9 @@ and the derived files \@makeother{127}% \luatexsetcatcoderange{65}{90}{12}% A-Z \luatexsetcatcoderange{97}{122}{12}% a-z - \saveluatexcatcodetable\CatcodeTableString + \luatexsavecatcodetable\CatcodeTableString \@makeother{32}% space - \saveluatexcatcodetable\CatcodeTableOther + \luatexsavecatcodetable\CatcodeTableOther \endgroup } \directlua{luatextra.catcodetable_do_shortcuts()} @@ -349,6 +355,7 @@ and the derived files % \texttt{\string\newluacatcodetable}. % % \begin{macrocode} +luatextra = luatextra or {} luatextra.catcodetables = {} tex.catcodetablenumber = luatextra.catcodetables function luatextra.catcodetabledef_from_tex(name, number) @@ -398,5 +405,28 @@ end %</luamodule> % \end{macrocode} % +% \section{Test files} +% +% 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|. +% +% \begin{macrocode} +%<testplain>\input luatexbase-cctb.sty +%<testlatex>\RequirePackage{luatexbase-cctb} +%<*testplain,testlatex> +\newluatexcatcodetable\testcctb +\directlua{assert(luatextra.catcodetables.testcctb)} +\begingroup +\escapechar64 +\newluatexcatcodetable\anothercctb +\endgroup +% \directlua{assert(luatextra.catcodetables.anothercctb)} +%</testplain,testlatex> +%<testplain>\bye +%<testlatex>\stop +% \end{macrocode} +% % \Finale \endinput |