summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex50
1 files changed, 41 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex
index 0ec94b6e822..6812abb9a5c 100644
--- a/Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex
+++ b/Master/texmf-dist/doc/latex/oberdiek/etexcmds-test1.tex
@@ -25,17 +25,49 @@
%% This work consists of the main source file etexcmds.dtx
%% and the derived files
%% etexcmds.sty, etexcmds.pdf, etexcmds.ins, etexcmds.drv,
-%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex.
+%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex,
+%% etexcmds-test4.tex.
%%
-\immediate\write16{etexcmds-test1.tex: test file for plainTeX}
-\input etexcmds.sty\relax
\catcode`\@=11 %
-\edef\x{\string\unexpanded}
-\edef\y{\meaning\etex@unexpanded}
-\ifx\x\y
-\else
- \@PackageError{etexcmds-test1}{Test failed}\@ehc
-\fi
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@\@ne
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@\@ne
+ \repeat
+}
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \input etexcmds.sty\relax
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
\end
\endinput
%%