summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex64
1 files changed, 63 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex
index 66a2de33992..8c479370a03 100644
--- a/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex
@@ -37,18 +37,69 @@
\NeedsTeXFormat{LaTeX2e}
\nofiles
\listfiles
+\tracingnesting=2 %
\documentclass{minimal}
-\usepackage{catchfile}[2010/04/08]
+\usepackage{catchfile}[2010/04/28]
\makeatletter
\def\mysetup{%
\let\do\@makeother
\dospecials
}
+\def\CheckContents{%
+ \begingroup
+ \expandafter\ifx\csname contents\endcsname\relax
+ \PackageError{TEST}{\string\contents\space is not defined}\@ehc
+ \fi
+ \endgroup
+}
+\def\StartDisableUnexpanded{%
+ \begingroup
+ \let\etex@unexpanded\@undefined
+}
+\def\StopDisableUnexpanded{%
+ \endgroup
+}
+\def\CheckCleanup{%
+ \begingroup
+ \edef\x{\the\toks0}%
+ \def\y{ABC}%
+ \ifx\x\y
+ \else
+ \PackageError{TEST}{\string\toks0 has changed}\@ehc
+ \fi
+ \ifx\CatchFile@gtemp\@undefined
+ \else
+ \PackageError{TEST}{Left over \string\CatchFile@gtemp}\@ehc
+ \fi
+ \endgroup
+}
+\def\Check{%
+ \CheckContents
+ \CheckCleanup
+}
\makeatother
\begin{document}
+\toks0{ABC}
\CatchFileDef\contents{catchfile.sty}\mysetup
\typeout{\meaning\contents}
+\Check
+\typeout{***********************************************************}%
+\CatchFileDef\contents{catchfile.sty}{}
+\typeout{\meaning\contents}
+\Check
+\typeout{***********************************************************}%
+
+\StartDisableUnexpanded
+\CatchFileDef\contents{catchfile.sty}\mysetup
+\typeout{\meaning\contents}
+\Check
+\typeout{***********************************************************}%
+\CatchFileDef\contents{catchfile.sty}{}
+\typeout{\meaning\contents}
+\Check
+\typeout{***********************************************************}%
+\StopDisableUnexpanded
\CatchFileEdef\contents{catchfile.sty}{%
\mysetup
@@ -56,6 +107,17 @@
\obeylines
}
\typeout{\contents}
+\Check
+\typeout{***********************************************************}%
+\CatchFileEdef\contents{catchfile.sty}{%
+ \catcode`\\=12 %
+ \catcode`\#=12 %
+ \def\par{^^J}%
+ \obeylines
+}
+\typeout{\contents}
+\Check
+\typeout{***********************************************************}%
\end{document}
\endinput
%%