summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-25 00:14:21 +0000
committerKarl Berry <karl@freefriends.org>2007-10-25 00:14:21 +0000
commit3a17bfd79ba2527e8947328a85d40bb12a75cedb (patch)
tree14d6a30c876712ca634fc72acdb683873ff7a0a6 /Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex
parent7d6ef8fd8f6ae3043dd7aa5c350ac30e8ee509ec (diff)
oberdiek update, kvoptions3.0 askinclude2.0 ... (24oct07)
git-svn-id: svn://tug.org/texlive/trunk@5275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex204
1 files changed, 204 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex
new file mode 100644
index 00000000000..fb2270519fe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex
@@ -0,0 +1,204 @@
+%%
+%% This is file `askinclude-test2.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% askinclude.dtx (with options: `test0,test2')
+%%
+%% 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{*}
+\CheckAnswer{*}
+\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}
+\@input{askinclude-a.aux}
+\AskInc@AddFile{askinclude-b}
+\@input{askinclude-b.aux}
+\AskInc@AddFile{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-test2.tex'.