| 1 |
%% |
| 2 |
%% This is file `apptools-test.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% apptools.dtx (with options: `test') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: apptools |
| 12 |
%% Version: 2012/11/28 v1.0 |
| 13 |
%% |
| 14 |
%% Copyright (c) 2012 by Sebastian Kuhnert <mail at sebastian-kuhnert.de> |
| 15 |
%% |
| 16 |
%% This work may be distributed and/or modified under the conditions of the LaTeX |
| 17 |
%% Project Public License, either version 1.3c of this license or (at your |
| 18 |
%% option) any later version. The latest version of this license is available at |
| 19 |
%% http://www.latex-project.org/lppl.txt and version 1.3c or later is part of all |
| 20 |
%% distributions of LaTeX version 2008/05/04 or later. |
| 21 |
%% |
| 22 |
%% This work has the LPPL maintenance status `maintained', the Current Maintainer |
| 23 |
%% of this work is Sebastian Kuhnert. |
| 24 |
%% |
| 25 |
%% This work consists of the main source file apptools.dtx and the derived files |
| 26 |
%% apptools.sty, apptools.pdf, apptools.ins, apptools.drv, apptools-test.tex. |
| 27 |
%% |
| 28 |
\NeedsTeXFormat{LaTeX2e} |
| 29 |
\nofiles |
| 30 |
\documentclass{article} |
| 31 |
\usepackage{apptools}[2012/11/28] |
| 32 |
\usepackage{qstest} |
| 33 |
\IncludeTests{*} |
| 34 |
\LogTests{log}{*}{*} |
| 35 |
|
| 36 |
\begin{document} |
| 37 |
\makeatletter |
| 38 |
|
| 39 |
\begin{qstest}{AtAppendix}{AtAppendix} |
| 40 |
\def\defaulthook{\appendixtrue} |
| 41 |
\Expect*{\meaning\defaulthook}*{\meaning\apptools@hook} |
| 42 |
\g@addto@macro\defaulthook{\def\fooafterappendix{foo}} |
| 43 |
\AtAppendix{\def\fooafterappendix{foo}} |
| 44 |
\Expect*{\meaning\defaulthook}*{\meaning\apptools@hook} |
| 45 |
\Expect*{\meaning\fooafterappendix}{undefined} |
| 46 |
\end{qstest} |
| 47 |
|
| 48 |
\begin{qstest}{ifbefore}{ifbefore} |
| 49 |
\Expect{else}*{\ifappendix then\else else\fi} |
| 50 |
\Expect{else}*{\IfAppendix{then}{else}} |
| 51 |
\end{qstest} |
| 52 |
|
| 53 |
\appendix |
| 54 |
|
| 55 |
\begin{qstest}{ifafter}{ifafter} |
| 56 |
\Expect{then}*{\ifappendix then\else else\fi} |
| 57 |
\Expect{then}*{\IfAppendix{then}{else}} |
| 58 |
\end{qstest} |
| 59 |
|
| 60 |
\begin{qstest}{hook}{hook} |
| 61 |
\def\expected{foo} |
| 62 |
\Expect*{\meaning\fooafterappendix}*{\meaning\expected} |
| 63 |
\end{qstest} |
| 64 |
|
| 65 |
\end{document} |
| 66 |
\@@end |
| 67 |
\endinput |
| 68 |
%% |
| 69 |
%% End of file `apptools-test.tex'. |