Debian Codegraph @

texmf-dist/doc/latex/qstest/makematch-qs.tex

raw
1 %%
2 %% This is file `makematch-qs.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% makematch.dtx (with options: `test,etex')
8 %%
9 %% IMPORTANT NOTICE:
10 %%
11 %% For the copyright see the source file.
12 %%
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from makematch-qs.tex.
15 %%
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file makematch.dtx.
18 %%
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 %%
24 %% Copyright (C) 2006, 2007 QuinScape GmbH
25 %% http://www.quinscape.de
26 \RequirePackage{makematch,qstest}
27 \IncludeTests{*}
28 \begin{qstest}{\MakeMatcher}{\MakeMatcher}
29 \MakeMatcher\stylefiles{*.sty}
30 \MakeMatcher\headbang{!*}
31 \MakeMatcher[,]\truestylefiles{*.sty,!.thumbnails/*,!*/.thumbnails/*}
32 \begin{qstest}{\Makematcher literal}{\MakeMatcher}
33 \begin{ExpectCallSequence}{\true{}\false{}`%
34 .#1{\Expect*{\CalledName#1}{true}}+'}
35 \stylefiles{{xxx/.thumbnails/blubb.sty}}{\true}{\false}
36 \truestylefiles{{xxx/.thumbnails/blubb.sty}}{\false}{\true}
37 \headbang{{xxx/.thumbnails/blubb.sty}}{\false}{\true}
38 \stylefiles{[ ]{x.sty.gz .thumbnails/x.sty !x}}{\true}{\false}
39 \truestylefiles{[ ]{x.sty.gz .thumbnails/x.sty !x}}{\false}{\true}
40 \headbang{[ ]{x.sty.gz .thumbnails/x.sty !x}}{\true}{\false}
41 \end{ExpectCallSequence}
42 \end{qstest}
43 \begin{qstest}{\Makematcher with \MakeMatchTarget}%
44 {\MakeMatcher,\MakeMatchTarget}
45 \MakeMatchTarget\single{xxx/.thumbnails/blubb.sty}
46 \MakeMatchTarget[ ]\multiple{x.sty.gz .thumbnails/x.sty !x}
47 \begin{ExpectCallSequence}{\true{}\false{}`%
48 .#1{\Expect*{\CalledName#1}{true}}+'}
49 \stylefiles{\single}{\true}{\false}
50 \truestylefiles\single{\false}{\true}
51 \headbang\single{\false}{\true}
52 \stylefiles{\multiple}{\true}{\false}
53 \truestylefiles\multiple{\false}{\true}
54 \headbang\multiple{\true}{\false}
55 \end{ExpectCallSequence}
56 \end{qstest}
57 \begin{qstest}{\MatchedTarget}
58 {\MakeMatcher,\MakeMatchTarget,\MatchedTarget}
59 \MakeMatchTarget\single{xxx/.thumbnails/blubb.sty}
60 \MakeMatchTarget[ ]\multiple{x.sty.gz .thumbnails/x.sty !x}
61 \begin{ExpectCallSequence}{\true{}\false{}`%
62 .#1{\Expect*{\CalledName#1}{true}}+'}
63 \stylefiles{\single}{\true}{\false}
64 \Expect*{\single}{xxx/.thumbnails/blubb.sty}
65 \Expect*{\meaning\MatchedTarget}*{\meaning\single}
66 \RemoveMatched\single
67 \Expect*{\meaning\single}{macro:->}
68 \truestylefiles\single{\false}{\true}
69 \headbang\single{\false}{\true}
70 \stylefiles{\multiple}{\true}{\false}
71 \Expect*{\MatchedTarget}{.thumbnails/x.sty}
72 \RemoveMatched\multiple
73 \Expect\expandafter{\multiple}{x.sty.gz\,!x}
74 \truestylefiles\multiple{\false}{\true}
75 \Expect*{\meaning\MatchedTarget}{undefined}
76 \headbang\multiple{\true}{\false}
77 \Expect*{\MatchedTarget}{!x}
78 \RemoveMatched\multiple
79 \Expect*{\multiple}{x.sty.gz}
80 \end{ExpectCallSequence}
81 \end{qstest}
82 \end{qstest}
83 \makeatletter
84 \begin{qstest}{\MakeMatcher internals}{\MakeMatcher,internal}
85 \MakeMatcher\sometest{}
86 \Expect*{\meaning\sometest}{macro:#1->\qst@setup#1\qst@finish}
87 \MakeMatcher[,]\sometest{ a, bc*, !woozle**, !*#*woz***.*x, !!*ab}
88 \Expect*{\meaning\sometest}{macro:#1->%
89 \qst@setup#1%
90 \qst@checkname{a}\@firstoftwo
91 \qst@checkname{bc##2}\@firstoftwo
92 \qst@checkname{woozle##2}\@secondoftwo
93 \qst@checkname{##2####3woz##4.##5x}\@secondoftwo
94 \qst@checkname{##2ab}\@firstoftwo
95 \qst@finish}
96 \MakeMatcher[ ]\another{ a bc* ! woozle** ! *#*woz***.*x ! ! *ab}
97 \Expect*{\meaning\another}*{\meaning\sometest}
98 \end{qstest}
99 \stop
100 \endinput
101 %%
102 %% End of file `makematch-qs.tex'.