summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex217
1 files changed, 39 insertions, 178 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
index 50561278fd1..39fe9a2f27f 100644
--- a/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
+++ b/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
@@ -25,188 +25,49 @@
%% This work consists of the main source file infwarerr.dtx
%% and the derived files
%% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv,
-%% infwarerr-test1.tex, infwarerr-test2.tex.
+%% infwarerr-test1.tex, infwarerr-test2.tex,
+%% infwarerr-test3.tex.
%%
-\let\PackageInfo\relax
-\input infwarerr.sty\relax
-\let\OrgWrite\write
-\chardef\WriteUnused=16 %
-\def\msg#{\immediate\OrgWrite\WriteUnused}
-\msg{File: infwarerr-test1.tex 2007/06/14 v1.1 Test file for plain-TeX}
-\catcode64=11 %
-\def\pkgname{PACKAGE}
-\def\clsname{CLASS}
-\def\msgtext{MESSAGE\MessageBreak SECOND LINE}
-\def\hlptext{HELP\MessageBreak SECOND LINE}
-
-\let\OrgWrite\write
-\let\OrgErrMessage\errmessage
-
-\def\write#1#{%
- \@write{#1}%
-}
-\def\@write#1#2{%
- \OrgWrite#1{#2}%
- \xdef\WriteNum{\number#1}%
- \xdef\WriteText{#2}%
-}
-\def\TestFailed#1#2{%
- \OrgErrMessage{Test (\string#1) failed: #2}%
-}
-\def\TestWrite#1#2#3{%
- \ifnum\WriteNum=#2\relax
- \else
- \TestFailed#1{write stream number: \WriteNum <> #2}%
- \fi
- \begingroup
- \let~\space
- \edef\TestString{#3}%
- \ifx\WriteText\TestString
- \else
- \msg{}%
- \msg{[\WriteText]}%
- \msg{<>}%
- \msg{[#3]}% hash-ok
- \TestFailed#1{write text}%
- \fi
- \endgroup
-}
-\newtoks\ErrHelpToks
-\def\errmessage#1{%
- \global\ErrHelpToks=\expandafter{\the\errhelp}%
- \msg{**************** error message ****************}%
- \msg{! #1}%
- \msg{**************** help message *****************}%
- \msg{\the\errhelp}%
- \msg{***********************************************}%
- \xdef\ErrMessage{! #1}%
-}
-\def\TestInfo{%
- \@PackageInfo\pkgname\msgtext
- \TestWrite\@PackageInfo{-1}{%
- Package PACKAGE Info: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.%
- }%
- \@PackageInfoNoLine\pkgname\msgtext
- \TestWrite\@PackageInfoNoLine{-1}{%
- Package PACKAGE Info: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~SECOND LINE.%
- }%
- \@ClassInfo\clsname\msgtext
- \TestWrite\@ClassInfo{-1}{%
- Class CLASS Info: MESSAGE^^J%
- (CLASS)~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.%
- }%
- \@ClassInfoNoLine\clsname\msgtext
- \TestWrite\@ClassInfoNoLine{-1}{%
- Class CLASS Info: MESSAGE^^J%
- (CLASS)~~~~~~~~~~~SECOND LINE.%
- }%
-}
-\def\TestWarning{%
- \@PackageWarning\pkgname\msgtext
- \TestWrite\@PackageWarning\WriteUnused{%
- ^^J%
- Package PACKAGE Warning: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.%
- ^^J%
- }%
- \@PackageWarningNoLine\pkgname\msgtext
- \TestWrite\@PackageWarningNoLine\WriteUnused{%
- ^^J%
- Package PACKAGE Warning: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.%
- ^^J%
- }%
- \@ClassWarning\clsname\msgtext
- \TestWrite\@ClassWarning\WriteUnused{%
- ^^J%
- Class CLASS Warning: MESSAGE^^J%
- (CLASS)~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.%
- ^^J%
- }%
- \@ClassWarningNoLine\clsname\msgtext
- \TestWrite\@ClassWarningNoLine\WriteUnused{%
- ^^J%
- Class CLASS Warning: MESSAGE^^J%
- (CLASS)~~~~~~~~~~~~~~SECOND LINE.%
- ^^J%
- }%
-}
-\def\TestError{%
- \def\plaindots{.^^J ...^^J}
- \@PackageError\pkgname\msgtext\hlptext
- \@TestError\@PackageError{%
- ! Package PACKAGE Error: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J%
- ^^J%
- See the PACKAGE package documentation for explanation.^^J%
- Type~~H <return>~~for immediate help\plaindots
- }{%
- HELP^^J%
- SECOND LINE%
- }%
- \@ClassError\clsname\msgtext\hlptext
- \@TestError\@ClassError{%
- ! Class CLASS Error: MESSAGE^^J%
- (CLASS)~~~~~~~~~~~~~~SECOND LINE.^^J%
- ^^J%
- See the CLASS class documentation for explanation.^^J%
- Type~~H <return>~~for immediate help\plaindots
- }{%
- HELP^^J%
- SECOND LINE%
- }%
- \@PackageError\pkgname\msgtext\@ehc
- \@TestError\@PackageError{%
- ! Package PACKAGE Error: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J%
- ^^J%
- See the PACKAGE package documentation for explanation.^^J%
- Type~~H <return>~~for immediate help\plaindots
- }{%
- Try typing~~<return>~~to proceed.^^J%
- If that doesn't work, type~~X <return>~~to quit.%
- }%
- \@PackageError\pkgname\msgtext\@ehd
- \@TestError\@PackageError{%
- ! Package PACKAGE Error: MESSAGE^^J%
- (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J%
- ^^J%
- See the PACKAGE package documentation for explanation.^^J%
- Type~~H <return>~~for immediate help\plaindots
- }{%
- You're in trouble here.~~Try typing~~<return>~~to proceed.^^J%
- If that doesn't work, type~~X <return>~~to quit.%
+\catcode`\@=11 %
+\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\@TestError#1#2#3{%
- \begingroup
- \let~\space
- \edef\x{#2}%
- \ifx\x\ErrMessage
- \else
- \msg{}%
- \msg{[\ErrMessage]}%
- \msg{<>}%
- \msg{[\x]}%
- \TestFailed#1{errmessage text}%
- \fi
- \edef\x{\the\ErrHelpToks}%
- \edef\y{#3}%
- \ifx\x\y
- \else
- \msg{}%
- \msg{[\the\ErrHelpToks]}%
- \msg{<>}%
- \msg{[\y]}%
- \TestFailed#1{errhelp text}%
- \fi
- \endgroup
+\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 infwarerr.sty\relax
+ \RestoreCatcodes
}
-\TestInfo
-\TestWarning
-\TestError
+\Test
+\csname @@end\endcsname
\end
\endinput
%%