diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex | 130 |
1 files changed, 39 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex index 8cc9ef75b31..b6677eb7b7c 100644 --- a/Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex +++ b/Master/texmf-dist/doc/latex/oberdiek/atbegshi-test1.tex @@ -26,100 +26,48 @@ %% and the derived files %% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, %% atbegshi-example.tex, atbegshi-test1.tex, -%% atbegshi-test2.tex. +%% atbegshi-test2.tex, atbegshi-test3.tex. %% -\input atbegshi.sty\relax -\def\msg#{\immediate\write16} -\msg{File: atbegshi-test1.tex 2007/06/06 v1.5 Test file for plain-TeX} -\def\testmsg#1#2{% - \msg{}% - \msg{*** Test with box (#1), expected page output [#2]}% +\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 } - -\newbox\voidbox -\def\void{\box\voidbox} -\begingroup - \setbox\voidbox=\void -\endgroup - -\count0=0\relax -\AtBeginShipout{% - \global\advance\count0 by 1\relax - \msg{* Inside \string\AtBeginShipout: [\the\count0]}% -} - -\AtBeginShipoutFirst{% - \msg{* Inside \string\AtBeginShipoutFirst}% - Hello World% -} - -\testmsg{\string\null}{1} -\shipout\null - -\AtBeginShipoutFirst{% - This is too late% -} - -\testmsg{void}{} -\shipout\void - -\testmsg{\string\copy255 (not void)}{2} -\setbox255\hbox{\vrule height 10bp width 10bp} -\shipout\copy255 % - -\testmsg{\string\copy255 (again)}{3} -\shipout\copy255 % - -\testmsg{\string\box255}{4} -\shipout\box255 % - -\testmsg{\string\box255 (again)}{} -\shipout\box255 % - -\testmsg{\string\hbox}{5} -\shipout\hbox{\vrule height 5bp width 20bp} - -\testmsg{\string\vbox}{6} -\shipout\vbox{\hrule height 20bp width 5bp} - -\testmsg{\string\null, voided by hook}{} -\def\VoidBox{% - \begingroup - \setbox\AtBeginShipoutBox=\box\AtBeginShipoutBox - \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 atbegshi.sty\relax + \RestoreCatcodes } -\AtBeginShipout{\VoidBox} -\shipout\null -\def\VoidBox{} - -\msg{*** \string\begingroup} -\begingroup - \testmsg{void}{}% - \shipout\void -\msg{*** \string\endgroup} -\endgroup - -\msg{*** \string\begingroup} -\begingroup - \testmsg{void}{}% - \shipout\void - \testmsg{\string\null}{8}% - \shipout\null -\msg{*** \string\endgroup} -\endgroup - -\testmsg{output routine}{9} -Hello World -\vfill -\eject - -\testmsg{\string\null\space(discarded)}{} -\AtBeginShipout{% - \msg{* Inside \string\AtBeginShipout: DISCARD}% - \AtBeginShipoutDiscard -} -\shipout\null - +\Test +\csname @@end\endcsname \end \endinput %% |