[latex3-commits] [l3svn] 05/10: l3build: More tidying

noreply at latex-project.org noreply at latex-project.org
Thu Jun 22 16:53:27 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit ff95f74eb53a5cecd6f07022095e587fdc4034ab
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jun 22 14:00:25 2017 +0100

    l3build: More tidying
---
 l3build/l3build.dtx |   70 +++++++++++++++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 27 deletions(-)

diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index 2164385..1f1a36e 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -1361,8 +1361,10 @@
 %
 % \subsection{Commands in test files}
 %
-% A long version of |\typeout|, because tests may contain |\par| tokens.
-% Besides, with that |\TYPE|, we can do |\TYPE { ... \TRUE ... \NEWLINE ... }|.
+% \begin{macro}{\LONGTYPEOUT, \TYPE}
+%   A long version of |\typeout|, because tests may contain |\par| tokens.
+%   Besides, with that |\TYPE|, we can do
+%   |\TYPE { ... \TRUE ... \NEWLINE ... }|.
 %    \begin{macrocode}
 \long\def\LONGTYPEOUT#1{%
   \begingroup
@@ -1373,18 +1375,24 @@
 \let\TYPE\LONGTYPEOUT
 %    \end{macrocode}
 %
-% Start the test, after the optional |\documentclass|
-% |\begin{document}| commands with |\START|.  All lines in the |.log| file
-% before this will be ignored.
+% \begin{macro}{\STARTMESSAGE, \START}
+%   Start the test, after the optional |\documentclass|
+%   |\begin{document}| commands with |\START|.  All lines in the |.log| file
+%   before this will be ignored.
 %    \begin{macrocode}
 \def\STARTMESSAGE{This is a generated file for the l3build validation system.}
 \def\START{%
   \LONGTYPEOUT{^^JSTART-TEST-LOG^^J}%
   \LONGTYPEOUT{^^J%
-   \STARTMESSAGE%
-^^J^^JDon't change this file in any respect.%
-^^J^^J}}
+     \STARTMESSAGE%
+     ^^J^^JDon't change this file in any respect.%
+     ^^J^^J%
+  }%
+}
 %    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@@end, \END}
 % The test should end with |\END| or |\end{document}|
 % or |\bye| in plain \TeX{}.
 %    \begin{macrocode}
@@ -1393,48 +1401,56 @@
 \else
   \let\@@@end\@@end
 \fi
-\def\END
-  {%
-    \ifx\currentiflevel\@undefined\else
+\edef\END{%
+  \ifx\currentiflevel\@undefined\else
+    \unexpanded{%
       \ifnum\currentgrouplevel>0 %
         \LONGTYPEOUT{Bad grouping: \the\currentgrouplevel!}%
       \fi
       \ifnum\currentiflevel>2 %
         \LONGTYPEOUT{Bad conditionals: \the\numexpr\currentiflevel-2!}%
       \fi
-    \fi
-    \LONGTYPEOUT{^^JEND-TEST-LOG^^J}\@@@end
-  }
+    }%
+  \fi
+  \noexpand\LONGTYPEOUT{^^JEND-TEST-LOG^^J}%
+  \noexpand\@@@end
+}
 \ifx\@@end\@undefined
   \let\end\END
 \else
   \let\@@end\END
 \fi
 %    \end{macrocode}
-% Surround commands which produce irrelevant lines in the .log file by
-% |\OMIT|\dots|\TIMO|
+% \end{macro}
+%
+% \begin{macro}{\OMIT, \TIMO}
+%   Surround commands which produce irrelevant lines in the |.log| file by
+%   |\OMIT|\dots|\TIMO|
 %    \begin{macrocode}
 \def\OMIT{\LONGTYPEOUT{OMIT}}
 \def\TIMO{\LONGTYPEOUT{TIMO}}
 %    \end{macrocode}
+% \end{macro}
+%
 % 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|.
 %    \begin{macrocode}
 \ifx\InputIfFileExists\@undefined
-\newread\@inputcheck
-\long\def\InputIfFileExists#1#2#3{%
-  \openin\@inputcheck#1\relax
-  \ifeof\@inputcheck
-    \def\reserved at a{#3}%
-  \else
-    \def\reserved at a{#2\input #1\relax}%
-  \fi
-  \closein\@inputcheck
-  \reserved at a}
+  \newread\@inputcheck
+  \long\def\InputIfFileExists#1#2#3{%
+    \openin\@inputcheck#1\relax
+    \ifeof\@inputcheck
+      \def\reserved at a{#3}%
+    \else
+      \def\reserved at a{#2\input #1\relax}%
+    \fi
+    \closein\@inputcheck
+    \reserved at a
+  }%
 \fi
 \InputIfFileExists{regression-test.cfg}
-      {\LONGTYPEOUT{^^J***^^Jregression-test.cfg in operation^^J***^^J}}{}
+  {\LONGTYPEOUT{^^J***^^Jregression-test.cfg in operation^^J***^^J}}{}
 %    \end{macrocode}
 %
 % Load the map file early so it does not appear in the log.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list