summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex207
1 files changed, 207 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex
new file mode 100644
index 00000000000..80eae1bb8c8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex
@@ -0,0 +1,207 @@
+%%
+%% This is file `askinclude-test7.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% askinclude.dtx (with options: `test0,test7')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 1991-1994 by Pablo A. Straub
+%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file askinclude.dtx
+%% and the derived files
+%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv,
+%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex,
+%% askinclude-test1.tex, askinclude-test2.tex,
+%% askinclude-test3.tex, askinclude-test4.tex,
+%% askinclude-test5.tex, askinclude-test6.tex,
+%% askinclude-test7.tex, askinclude-test8.tex,
+%% askinclude-test9.tex, askinclude-test10.tex,
+%% askinclude-test11.tex, askinclude-test12.tex,
+%% askinclude-test13.tex, askinclude-test14.tex,
+%% askinclude-test15.tex, askinclude-test16.tex,
+%% askinclude-test17.tex, askinclude-test18.tex,
+%% askinclude-test19.tex, askinclude-test20.tex,
+%% askinclude-test21.tex, askinclude-test22.tex,
+%% askinclude-test23.tex, askinclude-test24.tex.
+%%
+\ifx\CompatibilityMode Y%
+ \documentstyle[filecontents,qstest,askinclude]{book}%
+\else
+ \documentclass{book}%
+ \usepackage{filecontents}%
+ \usepackage{qstest}%
+ \ifx\AtBeginDocumentMode Y%
+ \AtBeginDocument{%
+ \usepackage{askinclude}[2007/10/23]%
+ }%
+ \else
+ \usepackage{askinclude}[2007/10/23]%
+ \fi
+\fi
+\IncludeTests{*}
+\LogTests{log}{*}{*}
+\makeatletter
+\let\org@typein\typein
+\def\typein[#1]#2{%
+ \ifx\@Stack\@StackEmpty
+ \begin{qstest}{StackNonEmpty}{StackNonEmpty}%
+ \Expect{Error: empty stack}{}%
+ \end{qstest}%
+ \org@typein[{#1}]{#2}%
+ \else
+ \edef#1{%
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \expandafter\@car\@Stack\@nil
+ }%
+ }%
+ \xdef\@Stack{%
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \expandafter\@cdr\@Stack\@nil
+ }%
+ }%
+ \typeout{}%
+ \typeout{\string#1=#1}%
+ \fi
+}
+\def\@StackEmpty{\BOTTOM}
+\let\@Stack\@StackEmpty
+\newcommand*{\Stack}[1]{%
+ \def\@Stack{#1\BOTTOM}%
+}
+\AtEndDocument{%
+ \begin{qstest}{StackUsed}{StackUsed}%
+ \Expect*{%
+ \ifx\@Stack\@StackEmpty
+ \else
+ Error: Unused stack entries%
+ \fi
+ }{}%
+ \end{qstest}%
+}
+\newcommand*{\CheckInclude}[2]{%
+ \include{askinclude-#1}%
+ \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}%
+ \Expect*{%
+ \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi
+ }{#2}%
+ \end{qstest}%
+}
+\def\@EndChecks{}
+\AtBeginDocument{%
+ \AtEndDocument{%
+ \if@filesw
+ \immediate\write\@mainaux{\string\@EndChecks}%
+ \fi
+ }%
+}
+\newcommand*{\CheckAnswer}[1]{%
+ \gdef\AnswerText{#1}%
+ \g@addto@macro\@EndChecks{\@CheckAnswer}%
+}
+\def\@CheckAnswer{%
+ \begin{qstest}{CheckAnswer}{CheckAnswer}%
+ \Expect*{\unexpanded\expandafter{\AskInc@Answer}}%
+ *{\unexpanded\expandafter{\AnswerText}}%
+ \end{qstest}%
+}
+\newcommand*{\CheckMatchMethod}[1]{%
+ \gdef\MatchMethodText{#1}%
+ \g@addto@macro\@EndChecks{\@CheckMatchMethod}%
+}
+\def\@CheckMatchMethod{%
+ \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}%
+ \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}%
+ *{\unexpanded\expandafter{\MatchMethodText}}%
+ \end{qstest}%
+}
+\def\@CheckAux{%
+ \begin{qstest}{CheckAux}{CheckAux}%
+ \def\GetFileContents##1{%
+ \pdfunescapehex{%
+ \pdffiledump length\pdffilesize{##1}{##1}%
+ }%
+ }%
+ \Expect*{\GetFileContents{\jobname.aux}}%
+ *{\GetFileContents{\jobname-aux.aux}}%
+ \end{qstest}%
+}
+\g@addto@macro\@EndChecks{\@CheckAux}
+\let\org@filec@ntents\filec@ntents
+\def\filec@ntents{%
+ \catcode`\|=0 %
+ \org@filec@ntents
+}
+\begingroup
+ \endlinechar=-1 %
+ \catcode`\|=0 %
+ \@makeother\#%
+ \@makeother\\%
+ |gdef|AddList{%
+ \providecommand*\AskInc@AddList[2]{%
+ \ifcase\ifx#1\@undefined
+ \else\ifx#1\relax
+ \else\ifx#1\@empty
+ \else1\fi\fi\fi0 %
+ \gdef#1{#2}%
+ \else
+ \g@addto@macro#1{,#2}%
+ \fi
+ }%
+ }%
+ |gdef|AddFile{%
+ \providecommand\AskInc@AddFile{%
+ \AskInc@AddList\AskInc@Files
+ }%
+ }%
+ |gdef|AddMatch{%
+ \providecommand\AskInc@AddMatch{%
+ \AskInc@AddList\AskInc@MatchFiles
+ }%
+ }%
+|endgroup
+\Stack{?yA}
+\CheckAnswer{askinclude-a,askinclude-b,askinclude-c}
+\begin{filecontents*}{\jobname.aux}
+\relax
+\end{filecontents*}
+\begin{filecontents*}{\jobname-aux.aux}
+\relax|space
+\gdef\AskInc@Answer{}
+\gdef\AskInc@MatchMethod{}
+|AddList
+|AddFile
+\AskInc@AddFile{askinclude-a}
+\gdef\AskInc@Answer{askinclude-a}
+\@input{askinclude-a.aux}
+\AskInc@AddFile{askinclude-b}
+\gdef\AskInc@Answer{askinclude-a,askinclude-b}
+\@input{askinclude-b.aux}
+\AskInc@AddFile{askinclude-c}
+\gdef\AskInc@Answer{askinclude-a,askinclude-b,askinclude-c}
+\@input{askinclude-c.aux}
+\@EndChecks
+\end{filecontents*}
+\begin{document}
+\CheckInclude{a}{true}
+\CheckInclude{b}{true}
+\CheckInclude{c}{true}
+\end{document}
+\endinput
+%%
+%% End of file `askinclude-test7.tex'.