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