summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/l3experimental/xcoffins/regression-test.tex
blob: c7abb659a9859cb1f0154c171c4700a744e28233 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
% \iffalse meta-comment
%
% Copyright (C) 1992-1994 by David Carlisle, Frank Mittelbach.  
% Copyright (C) 2008 LaTeX3 project
% All rights reserved.
% 
% This file is part of the validate package.
% 
% IMPORTANT NOTICE:
% 
% You are not allowed to change this file.  In case of error
% write to the email address mentioned in the file readme.val.
% 
% \fi
%                  regression-test.tex
                   %%%%%%%%%%%%%%%%%%%

% This file should not be used as a package or class file, 
% it should be \input.

% The scope of this \makeatletter will then be the rest of the
% document.  Put TeX into scroll mode, and stop it showing the
% implementation details of macros in error messages.
\makeatletter
\scrollmode
\errorcontextlines=-1

% Use the same \showbox settings as 2.09, unless they are changed in 
% the test file. (2e sets these to -1)
\showboxbreadth=5
\showboxdepth=3

% Start the test, after the optional \documentclass (or \documentstyle)
% \begin{document} commands with \START.  All lines in the .log file
% before this will be ignored. It also prints a docstrip-style
% character table in the .tlg file so the .tlg file can easily be
% checked for email translations.
%
\def\START{\typeout{START-TEST-LOG^^J^^J%
   This is a generated file for the LaTeX (2e + expl3) validation system.%
^^J^^JDon't change this file in any respect.%
^^J^^J\CTable^^J}}

\begingroup
\catcode`\^^\=0
\catcode`\^^A=\catcode`\%
^^\catcode`^^\ =11
^^\catcode`^^\%=11
^^\catcode`^^\#=11
^^\catcode`^^\~=11
^^\endlinechar=`^^\^^J
^^\catcode`^^\\=11^^A
^^\gdef^^\CTable{
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
}^^A
^^\endgroup{}%

% The test should end with
% \END or \end{document}
%
\let\@@@end\@@end
%\let\@ED=\enddocument
\def\END{\typeout{END-TEST-LOG}\@@@end}
\let\@@end\END


% After the \START should come declarations of the format and style
% options being used.
%
\def\FORMAT#1{\typeout{Format: #1}%
  \def\@tempa{#1}\ifx\@tempa\@EJ\else
   \OMIT\@warning{Declared format #1,^^JActual format \@EJ}\TIMO\fi}

% The old version got this information from everyjob, 
% but that does not work with LaTeX2e as \everyjob is cleared.
\edef\@EJ{\fmtname <\fmtversion>}

% Some author info:
\def\AUTHOR#1{\typeout{Author: #1}}
\def\ADDRESS#1{\typeout{Address: #1}}

% Not all packages declare themselves to the log file, and we can not
% rely on TeX`s output as it includes full path names, and does not
% include version numbers etc.  So for each package included give a
% declaration like: \PACKAGES{array v2.0d}
%
\def\STYLE#1{\typeout{Main Style: #1}}%
\def\STYLEOPTIONS#1{\typeout{Style Options: #1}}


% If The class or package is loaded with options, you may
% specify the options in the \CLASS (\PACKAGE) declaration. eg:
%
% \CLASS[german,a4page]{article v2.0 1994/01/02}
% \PACKAGE{ifthen v2.2 1993/11/12}
% \PACKAGE[dvips]{graphics v 3.8 1994/02/02}
%
\def\CLASS{\@ifnextchar[\OPTCLASS\XCLASS}
\def\OPTCLASS[#1]#2{%
  \typeout{Main Class: #2^^J\@spaces Options: #1}}
\def\XCLASS#1{%
  \typeout{Main Class: #1}}

\def\PACKAGE{\@ifnextchar[\OPTPACKAGE\XPACKAGE}
\def\OPTPACKAGE[#1]#2{%
  \typeout{Package: #2^^J\@spaces Options: #1}}
\def\XPACKAGE#1{%
  \typeout{Package: #1}}


% LaTeX2e always uses NFSS2 so new test files need not use 
% \FONTSELECTION but it is retained for compatibility for test files
% written for 209/NFSS1.
%
\def\FONTSELECTION#1{%
  \OMIT\@@warning{\noexpand\FONTSELECTION obsolete.^^J%
                 LaTeX2e always uses NFSS2}\TIMO
  \typeout{Font Selection: #1}}


% Surround commands which produce irrelevant lines in the .log file by
% \OMIT
% \TIMO
%
\def\OMIT{\typeout{OMIT}}
\def\TIMO{\typeout{TIMO}}

% After the above declarations, and before the main tests, you may
% optionally `declare' all the commands in the `module' that you are
% about to test. These commands will be registered as defined,
% undefined or relaxed (ie \let to \relax). You may wish to declare
% commands not currently implemented, so that if they are added at a
% later stage, the test will fail, reminding someone to document the
% fact that the user interface has changed. So if you are testing
% array and tabular environments, you may wish do declare
% \extrarowheight. This is undefined in the curent latex, but would
% become defined if Mittelbach's array.sty was incorporated into
% latex.tex.
%
\def\declare@command#1{%
  \ifx#1\@undefined\typeout{Undefined \string#1}\else
  \ifx#1\relax\typeout{Relaxed \space\space\string#1}\else
         \typeout{Defined \space\space\string#1}\fi\fi}


% To allow testing of possible changes, we allow extra code to be read
% in before the test starts. The necessary code should be placed in a
% file regression-test.cfg.
%
\OMIT
\InputIfFileExists{regression-test.cfg}
      {\typeout{^^J***^^Jregression-test.cfg in operation^^J***^^J}}{}
\TIMO

%%%%%%%%% 

% We are not starved for space in the log file output, so let's make it as
% verbose as is useful when reading the .diff's.
\newcount \gTESTint

\newcommand \SEPARATOR {%
  \typeout{%
    ============================================================%
  }%
}

\newcommand \TEST [2] {%
  \advance \gTESTint 1
  \SEPARATOR
  \typeout{%
    TEST \the\gTESTint: \detokenize{#1}}%
  \SEPARATOR 
  \begingroup
    \let \TYPE \typeout
    #2%
  \endgroup
  \SEPARATOR \typeout{}%
}

\newcommand \TESTEXP [2] {%
  \advance \gTESTint 1
  \SEPARATOR
  \typeout{%
    TEST \the\gTESTint: \detokenize{#1}}%
  \SEPARATOR 
  \begingroup
    \let \TYPE \@firstofone
    \typeout{#2}%
  \endgroup
  \SEPARATOR \typeout{}%
}

\def \TRUE  {\TYPE{TRUE}}
\def \FALSE {\TYPE{FALSE}}
\def \YES   {\TYPE{YES}}
\def \NO    {\TYPE{NO}}

\def \NEWLINE {\TYPE{^^J}}

\endinput