summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/l3build/CONTRIBUTING.md51
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin627753 -> 632072 bytes
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx103
-rw-r--r--Master/texmf-dist/tex/latex/l3build/l3build.lua148
-rw-r--r--Master/texmf-dist/tex/latex/l3build/regression-test.tex25
6 files changed, 227 insertions, 102 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CONTRIBUTING.md b/Master/texmf-dist/doc/latex/l3build/CONTRIBUTING.md
new file mode 100644
index 00000000000..67869125e1b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/l3build/CONTRIBUTING.md
@@ -0,0 +1,51 @@
+Thanks for considering contributing to `l3build`: feedback, fixes and ideas are
+all useful. Here, we ([The LaTeX3 Project](https://www.latex-project.org)) have
+collected together a few pointers to help things along.
+
+## Bugs
+
+Please log bugs using the [issues](https://github.com/latex3/l3build/issues)
+system on GitHub, and choose the 'bug' label. Handy information that you might
+include, depending on the nature of the issue, includes
+
+- Your version of `l3build` (`texlua l3build.lua version`)
+- Your TeX system details (for example 'TeX Live 2017')
+- Your operating system
+- The contents of your `build.lua` file
+- An 'ASCII art' explanation of your directory layout
+
+## Feature requests
+
+Feature requests are welcome: log them in the same way as bugs and pick
+the 'Enhancement' label. We welcome feature requests for the test set up,
+the build process, _etc._
+
+## Code contributions
+
+If you want to discuss a possible contribution before (or instead of)
+making a pull request, drop a line to
+[the team](mailto:latex-team@latex-project.org).
+
+There are a few things that might look non-standard to most Lua programmers,
+which come about as `l3build`'s focus is testing and building LaTeX packages:
+
+- Our target Lua set up is `texlua` (part of LuaTeX), not standalone `lua`
+- The main `l3build.lua` file is self-contained as this helps with
+ bootstrapping LaTeX: we are aiming to maintain a single file with
+ `.lua` dependencies
+- The primary documentation is aimed at the TeX world, so is in PDF format
+ and generated from `l3build.dtx`
+- As far as possible, everything is done within `l3build` itself or tools
+ directly available in a TeX system or as standard in the supported
+ systems (Windows, MacOS, Linux)
+- The `l3build` interfaces should be platform-agnostic (though it may be
+ necessary of course to branch inside particular functions)
+
+If you are submitting a pull request, notice that
+
+- We use Travis-CI for (light) testing so add `[ci skip]` to documentation-only
+ commit messages
+- We favour a single linear history so will rebase agreed pull requests on to
+ the `master` branch
+- Where a commit fixes or closes an issue, please include this information
+ in the first line of the commit message
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index 39b3e9ce2f5..f96892a628c 100644
--- a/Master/texmf-dist/doc/latex/l3build/README.md
+++ b/Master/texmf-dist/doc/latex/l3build/README.md
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2017/06/25
+Release 2017/07/01
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index 2585333cf26..026b6f7e348 100644
--- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf
+++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index ee9665618c1..a6e5471899e 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -16,7 +16,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/latex3/latex3
+% https://github.com/latex3/l3build
%
% for those people who are interested.
%
@@ -98,7 +98,7 @@
\luavarset{dviext} {".dvi"} {Extension of DVI files.}
\luavarset{lvtext} {".lvt"} {Extension of test files.}
\luavarset{tlgext} {".tlg"} {Extension of test file output.}
-\luavarset{lvtext} {".lve"} {Extension of auto-generating test file output.}
+\luavarset{lveext} {".lve"} {Extension of auto-generating test file output.}
\luavarset{logext} {".log"} {Extension of checking output, before processing it into a \texttt{.tlg}.}
\luavarset{pdfext} {".pdf"} {Extension of PDF file for checking and saving.}
\luavarset{psext} {".ps"} {Extension of PostScript files.}
@@ -108,7 +108,7 @@
\luavarset{unpackdeps} {\{~\}} {\dots for unpacking.}
\luavarseparator
\luavarset{checkengines}{\{"pdftex", "xetex", "luatex"\}} {Engines to check with \texttt{check} by default.}
-\luavarset{stdengine} {"pdtex"} {Engine to generate \texttt{.tlg} file from.}
+\luavarset{stdengine} {"pdftex"} {Engine to generate \texttt{.tlg} file from.}
\luavarset{checkformat} {"latex"} {Format to use for tests.}
\luavarseparator
\luavarset{typesetexe} {"pdflatex"} {Executable for compiling \texttt{doc(s)}.}
@@ -203,7 +203,7 @@
% }^^A
% }
%
-% \date{Released 2017/06/25}
+% \date{Released 2017/07/01}
%
% \maketitle
% \tableofcontents
@@ -300,15 +300,18 @@
% data
% \item \texttt{--engine} (\texttt{-e}) Sets the engine to use for
% testing
+% \item \texttt{--force} (\texttt{-f}) Force checks to run even if sanity
+% checks fail, \emph{e.g.}~when \texttt{--engine} is not given in
+% \luavar{checkengines}
% \item \texttt{--halt-on-error} (\texttt{-H}) Specifies that checks
% should stop as soon as possible, rather than running all requested
% tests; the difference file is printed in the terminal directly in the case of failure
% \item \texttt{--pdf} (\texttt{-p}) Test PDF file against a reference
% version rather than using a log comparison
% \item \texttt{--quiet} (\texttt{-q}) Suppresses output from unpacking
-% \item \texttt{--release} (\texttt{-r}) Release string to use when setting
-% version data
% \item \texttt{--textfiledir} (\texttt{-t}) Select a specific set of tests
+% \item \texttt{--version} (\texttt{-v}) Version string to use when setting
+% version data
% \end{itemize}
%
% \begin{buildcmd}{check}
@@ -352,7 +355,9 @@
% Checks only the test \texttt{\meta{name(s)}.lvt}.
% All engines specified by \var{checkengines} are tested unless the command
% line option \texttt{--engine} (or \texttt{-e}) has been given to limit
-% testing to a single engine.
+% testing to a single engine. Normally testing is preceded by unpacking
+% source files and copying the result plus any additional support to the
+% test directory: this may be skipped using the \texttt{-s} option.
% \end{buildcmd}
%
% \begin{buildcmd}{check -p}
@@ -443,7 +448,7 @@
%
% Source files specified in \var{sourcefiles} and \var{typesetsourcefiles}
% are unpacked before the typesetting takes place. (In most cases
-% \var{typesetsourcefiles} will be mepty, but may be used where there are
+% \var{typesetsourcefiles} will be empty, but may be used where there are
% files to unpack \emph{only} for typesetting.)
%
% If \var{typesetsearch} is \code{true} (default), standard \texttt{texmf} search trees are used in the typesetting compilation. If set to false, \emph{all} necessary files for compilation must be included in the |build/local| sandbox.
@@ -480,7 +485,7 @@
% \begin{buildcmd}{setversion}
% Modifies the content of files specified by |versionfiles| to allow
% automatic updating of the file date and version. The latter are
-% specified using the |-d| and |-r| command line options and if not
+% specified using the |-d| and |-v| command line options and if not
% given will default to the current date in ISO format (YYYY-MM-DD) and |-1|,
% respectively. As detailed below, the standard set up has no search pattern
% defined for this target and so no action will be taken \emph{unless}
@@ -776,6 +781,9 @@
% \cs{TESTEXP} surrounds its contents with \cs{TYPE} and formatting to match \cs{TEST}; this can be used as a shorthand to test expandable commands.
% \item
% TODO: would a \cs{TESTFEXP} command (based on \cs{romannumeral} expansion) be useful as well?
+% \item
+% \cs{BEGINTEST}\marg{title} \dots \cs{ENDTEST} is an environment form of
+% \cs{TEST}, allowing verbatim material, \emph{etc.} to appear.
% \end{itemize}
% An example of some of these commands is shown following.
% \begin{Verbatim}
@@ -917,6 +925,22 @@
% \label{fig:box-log}
% \end{figure}
%
+% \subsection{Testing entire pages}
+%
+% There may be occasions where creating entire test pages is necessary
+% to observe the test output required. That is best achieved by applying
+% \cs{showoutput} and forcing a complete page to be produced, for example
+% \begin{Verbatim}[frame=single,fontsize=\small]
+% \input{regression-test.tex}
+% \documentclass{article}
+% \usepackage{expl3}
+% \START
+% \showoutput
+% % Test content here
+% \vfil\break
+% \END
+% \end{Verbatim}
+%
% \subsection{Additional test tasks}
%
% A standard test will run the file \texttt{\meta{name}.lvt} using one
@@ -1034,7 +1058,7 @@
% a suitable function might read as shown in Figure~\ref{fig:update-line}.
% \begin{figure}
% \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
-% function setversion_update_line(line, date, release)
+% function setversion_update_line(line, date, version)
% -- No real regex so do it one type at a time
% for _,i in pairs({"Class", "File", "Package"}) do
% if string.match(
@@ -1044,7 +1068,7 @@
% line = string.gsub(line, "%[%d%d%d%d/%d%d/%d%d", "["
% .. string.gsub(date, "%-", "/")
% line = string.gsub(
-% line, "(%[%d%d%d%d/%d%d/%d%d) [^ ]*", "%1 " .. release
+% line, "(%[%d%d%d%d/%d%d/%d%d) [^ ]*", "%1 " .. version
% )
% break
% end
@@ -1133,12 +1157,14 @@
% \var{date} & String \\
% \var{engine} & Table \\
% \var{files} & Table \\
+% \var{force} & Boolean \\
% \var{halt} & Boolean \\
% \var{help} & Boolean \\
% \var{pdf} & Boolean \\
% \var{quiet} & Boolean \\
-% \var{release} & String \\
+% \var{rerun} & Boolean \\
% \var{testfiledir} & String \\
+% \var{version} & String \\
% \bottomrule
% \end{tabular}
% \end{center}
@@ -1256,7 +1282,7 @@
% error level.
% \end{function}
%
-% \begin{function}{spltpath()}
+% \begin{function}{splitpath()}
% \begin{syntax}
% |splitpath(|\meta{file}|)|
% \end{syntax}
@@ -1290,7 +1316,7 @@
%
% \begin{variable}{os_null}
% The location to redirect commands which should produce no output
-% at the terminal: almost always used preded by |>|, \emph{e.g.}
+% at the terminal: almost always used preceded by |>|, \emph{e.g.}
% \begin{verbatim}
% os.execute("tex " .. file .. " > " .. os_null)
% \end{verbatim}
@@ -1317,6 +1343,17 @@
% used inside |os.execute| (it does not terminate).
% \end{variable}
%
+% \subsection{Components of \texttt{l3build}}
+%
+% \begin{function}{call()}
+% \begin{syntax}
+% |call(|\meta{dirs}, \meta{target}|)|
+% \end{syntax}
+% Runs the \texttt{l3build} \meta{target} (a string) for each directory in the
+% \meta{dirs} (a table). This will pass command line options for the parent
+% script to the child processes.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -1492,7 +1529,18 @@
% \end{macro}
%
% \begin{macro}
-% {\SEPARATOR, \TEST, \TESTEXP, \TRUE, \FALSE, \YES, \NO, \NEWLINE}
+% {
+% \SEPARATOR,
+% \BEGINTEST,
+% \ENDTEST,
+% \TEST,
+% \TESTEXP,
+% \TRUE,
+% \FALSE,
+% \YES,
+% \NO,
+% \NEWLINE
+% }
% 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.
% \begin{macrocode}
@@ -1501,30 +1549,29 @@
============================================================%
}%
}
-\long\def\TEST#1#2{%
+\protected\long\def\BEGINTEST#1{%
\global\advance\gTESTint by 1 %
\SEPARATOR
\LONGTYPEOUT{TEST \the\gTESTint: \detokenize{#1}}%
\SEPARATOR
\begingroup
\let\TYPE\LONGTYPEOUT
- #2%
+
+}
+\protected\long\def\ENDTEST{%
\endgroup
\SEPARATOR
\LONGTYPEOUT{}%
}
+\long\def\TEST#1#2{%
+ \BEGINTEST{#1}%
+ #2%
+ \ENDTEST
+}
\long\def\TESTEXP#1#2{%
- \global\advance\gTESTint by 1 %
- \SEPARATOR
- \LONGTYPEOUT{%
- TEST \the\gTESTint: \detokenize{#1}}%
- \SEPARATOR
- \begingroup
- \long\def\TYPE##1{##1}%
- \LONGTYPEOUT{#2}%
- \endgroup
- \SEPARATOR
- \LONGTYPEOUT{}%
+ \BEGINTEST{#1}%
+ \LONGTYPEOUT{#2}%
+ \ENDTEST
}
\def \TRUE {\TYPE{TRUE}}
\def \FALSE {\TYPE{FALSE}}
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua
index 958c30e0d6c..f5b15f4088f 100644
--- a/Master/texmf-dist/tex/latex/l3build/l3build.lua
+++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua
@@ -16,14 +16,14 @@ and all files in that bundle must be distributed together.
The development version of the bundle can be found at
- https://github.com/latex3/latex3
+ https://github.com/latex3/l3build
for those people who are interested.
--]]
-- Version information
-release_date = "2017/06/25"
+release_date = "2017/07/01"
-- "module" is a deprecated function in Lua 5.2: as we want the name
-- for other purposes, and it should eventually be 'free', simply
@@ -40,9 +40,16 @@ bundle = bundle or ""
if module == "" and bundle == "" then
if string.match(arg[0], "l3build%.lua$") then
print(
- "\n"
- .. "Error: Call l3build using a configuration file, not directly.\n"
+ "\n" ..
+ "l3build: A testing and building system for LaTeX\n\n" ..
+ "Release " .. release_date
)
+ if arg[1] and not string.match(arg[1], "version") then
+ print(
+ "\n"
+ .. "Error: Call l3build using a configuration file, not directly.\n"
+ )
+ end
else
print(
"\n"
@@ -222,35 +229,41 @@ local function argparse()
{
date = "date" ,
engine = "engine" ,
+ force = "force" ,
["halt-on-error"] = "halt" ,
["halt-on-failure"] = "halt" ,
help = "help" ,
pdf = "pdf" ,
quiet = "quiet" ,
- release = "release" ,
- testfiledir = "testfiledir"
+ rerun = "rerun" ,
+ testfiledir = "testfiledir",
+ version = "version"
}
local short_options =
{
d = "date" ,
e = "engine" ,
+ f = "force" ,
h = "help" ,
H = "halt" ,
p = "pdf" ,
q = "quiet" ,
- r = "release" ,
- t = "testfiledir"
+ r = "rerun" ,
+ t = "testfiledir",
+ v = "version"
}
local option_args =
{
date = true ,
engine = true ,
+ force = false,
halt = false,
help = false,
pdf = false,
quiet = false,
- release = true,
- testfiledir = true
+ rerun = false,
+ testfiledir = true ,
+ version = true
}
local args = args
-- arg[1] is a special case: must be a command or "-h"/"--help"
@@ -357,10 +370,32 @@ options = argparse()
local optdate = options["date"]
local optengines = options["engine"]
+local optforce = options["force"]
local opthalt = options["halt"]
local optpdf = options["pdf"]
local optquiet = options["quiet"]
-local optrelease = options["release"]
+local optrerun = options["rerun"]
+local optversion = options["version"]
+
+-- Sanity check
+if optengines and not optforce then
+ -- Make a lookup table
+ local t = { }
+ for _, engine in pairs(checkengines) do
+ t[engine] = true
+ end
+ for _, engine in pairs(optengines) do
+ if not t[engine] then
+ print("\n! Error: Engine \"" .. engine .. "\" not set up for testing!")
+ print("\n Valid values are:")
+ for _, engine in ipairs(checkengines) do
+ print(" - " .. engine)
+ end
+ print("")
+ exit(1)
+ end
+ end
+end
-- Convert a file glob into a pattern for use by e.g. string.gub
-- Based on https://github.com/davidm/lua-glob-pattern
@@ -673,20 +708,12 @@ end
--
-- Do some subtarget for all modules in a bundle
-local function allmodules(target)
- local date = ""
- if optdate then
- date = " --date=" .. optdate[1]
- end
- local engines = ""
- if optengines then
- engines = " --engine=" .. concat(optengines, ",")
+function call(dirs, target)
+ local s = ""
+ for i = 2, #arg do
+ s = s .. " " .. arg[i]
end
- local release = ""
- if optrelease then
- release = " --release=" .. optrelease[1]
- end
- for _,i in ipairs(modules) do
+ for _,i in ipairs(dirs) do
print(
"Running script " .. scriptname .. " with target \"" .. target
.. "\" for module "
@@ -694,13 +721,7 @@ local function allmodules(target)
)
local errorlevel = run(
i,
- "texlua " .. scriptname .. " " .. target
- .. (opthalt and " -H" or "")
- .. date
- .. engines
- .. (optpdf and " -p" or "")
- .. (optquiet and " -q" or "")
- .. release
+ "texlua " .. scriptname .. " " .. target .. s
)
if errorlevel ~= 0 then
return errorlevel
@@ -1390,6 +1411,8 @@ function runtest(name, engine, hide, ext, makepdf)
.. os_concat ..
os_setenv .. " SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1"
.. os_concat ..
+ os_setenv .. " FORCE_SOURCE_DATE=1"
+ .. os_concat ..
-- Ensure lines are of a known length
os_setenv .. " max_print_line=" .. maxprintline
.. os_concat ..
@@ -1637,11 +1660,13 @@ function help()
print("Valid options are:")
print(" --date|-d Sets the date to insert into sources")
print(" --engine|-e Sets the engine to use for running test")
+ print(" --force|-f Force tests to run if engine is not set up")
print(" --halt-on-error|-H Stops running tests after the first failure")
print(" --pdf|-p Check/save PDF files")
print(" --quiet|-q Suppresses TeX output when unpacking")
- print(" --release|-r Sets the release to insert into sources")
+ print(" --rerun|-r Runs tests without any unpacking, etc.")
print(" --testfiledir|-t Selects the specified testfile location")
+ print(" --version|-v Sets the version to insert into sources")
print("")
print("See l3build.pdf for further details.")
end
@@ -1649,7 +1674,9 @@ end
function check(names)
local errorlevel = 0
if testfiledir ~= "" and direxists(testfiledir) then
- checkinit()
+ if not optrerun then
+ checkinit()
+ end
local hide = true
if names and next(names) then
hide = false
@@ -1740,7 +1767,7 @@ function clean()
end
function bundleclean()
- local errorlevel = allmodules("clean")
+ local errorlevel = call(modules, "clean")
for _,i in ipairs(cleanfiles) do
errorlevel = rm(".", i) + errorlevel
end
@@ -1824,7 +1851,7 @@ function ctan(standalone)
errorlevel = check()
bundle = module
else
- errorlevel = allmodules("bundlecheck")
+ errorlevel = call(modules, "bundlecheck")
end
if errorlevel == 0 then
rmdir(ctandir)
@@ -1834,7 +1861,7 @@ function ctan(standalone)
if standalone then
errorlevel = bundlectan()
else
- errorlevel = allmodules("bundlectan")
+ errorlevel = call(modules, "bundlectan")
end
else
print("\n====================")
@@ -1897,7 +1924,7 @@ function bundlectan()
end
-- For the purposes here, any typesetting demo files need to be
-- part of the main typesetting list
- local typesetfiles
+ local typesetfiles = typesetfiles
for _,v in pairs(typesetdemofiles) do
insert(typesetfiles, v)
end
@@ -2025,7 +2052,7 @@ end
-- Provide some standard search-and-replace functions
if versionform ~= "" and not setversion_update_line then
if versionform == "ProvidesPackage" then
- function setversion_update_line(line, date, release)
+ function setversion_update_line(line, date, version)
-- No real regex so do it one type at a time
for _,i in pairs({"Class", "File", "Package"}) do
if match(
@@ -2035,7 +2062,7 @@ if versionform ~= "" and not setversion_update_line then
line = gsub(line, "%[%d%d%d%d/%d%d/%d%d", "["
.. gsub(date, "%-", "/"))
line = gsub(
- line, "(%[%d%d%d%d/%d%d/%d%d) [^ ]*", "%1 " .. release
+ line, "(%[%d%d%d%d/%d%d/%d%d) [^ ]*", "%1 " .. version
)
break
end
@@ -2043,7 +2070,7 @@ if versionform ~= "" and not setversion_update_line then
return line
end
elseif versionform == "ProvidesExplPackage" then
- function setversion_update_line(line, date, release)
+ function setversion_update_line(line, date, version)
-- No real regex so do it one type at a time
for _,i in pairs({"Class", "File", "Package"}) do
if match(
@@ -2053,7 +2080,7 @@ if versionform ~= "" and not setversion_update_line then
line = gsub(
line,
"{%d%d%d%d/%d%d/%d%d}( *){[^}]*}",
- "{" .. gsub(date, "%-", "/") .. "}%1{" .. release .. "}"
+ "{" .. gsub(date, "%-", "/") .. "}%1{" .. version .. "}"
)
break
end
@@ -2061,22 +2088,22 @@ if versionform ~= "" and not setversion_update_line then
return line
end
elseif versionform == "filename" then
- function setversion_update_line(line, date, release)
+ function setversion_update_line(line, date, version)
if match(line, "^\\def\\filedate{%d%d%d%d/%d%d/%d%d}$") then
line = "\\def\\filedate{" .. gsub(date, "%-", "/") .. "}"
end
if match(line, "^\\def\\fileversion{[^}]+}$") then
- line = "\\def\\fileversion{" .. release .. "}"
+ line = "\\def\\fileversion{" .. version .. "}"
end
return line
end
elseif versionform == "ExplFileDate" then
- function setversion_update_line(line, date, release)
+ function setversion_update_line(line, date, version)
if match(line, "^\\def\\ExplFileDate{%d%d%d%d/%d%d/%d%d}$") then
line = "\\def\\ExplFileDate{" .. gsub(date, "%-", "/") .. "}"
end
if match(line, "^\\def\\ExplFileVersion{[^}]+}$") then
- line = "\\def\\ExplFileVersion{" .. release .. "}"
+ line = "\\def\\ExplFileVersion{" .. version .. "}"
end
return line
end
@@ -2084,16 +2111,16 @@ if versionform ~= "" and not setversion_update_line then
end
-- Used to actually carry out search-and-replace
-setversion_update_line = setversion_update_line or function(line, date, release)
+setversion_update_line = setversion_update_line or function(line, date, version)
return line
end
function setversion(dir)
- local function rewrite(dir, file, date, release)
+ local function rewrite(dir, file, date, version)
local changed = false
local result = ""
for line in lines(dir .. "/" .. file) do
- local newline = setversion_update_line(line, date, release)
+ local newline = setversion_update_line(line, date, version)
if newline ~= line then
line = newline
changed = true
@@ -2121,14 +2148,14 @@ function setversion(dir)
if optdate then
date = optdate[1] or date
end
- local release = -1
- if optrelease then
- release = optrelease[1] or release
+ local version = -1
+ if optversion then
+ version = optversion[1] or version
end
local dir = dir or "."
for _,i in pairs(versionfiles) do
for _,j in pairs(filelist(dir, i)) do
- rewrite(dir, j, date, release)
+ rewrite(dir, j, date, version)
end
end
return 0
@@ -2210,8 +2237,9 @@ end
function version()
print(
- "\n"
- .. "l3build Release " .. gsub(release_date, "/", "-") .. "\n"
+ "\n" ..
+ "l3build: A testing and building system for LaTeX\n\n" ..
+ "Release " .. release_date
)
end
@@ -2227,28 +2255,28 @@ function stdmain(target, files)
-- Detect all of the modules
modules = modules or listmodules()
if target == "doc" then
- errorlevel = allmodules("doc")
+ errorlevel = call(modules, "doc")
elseif target == "check" then
- errorlevel = allmodules("bundlecheck")
+ errorlevel = call(modules, "bundlecheck")
if errorlevel ~=0 then
print("There were errors: checks halted!\n")
end
elseif target == "clean" then
errorlevel = bundleclean()
elseif target == "cmdcheck" and next(cmdchkfiles) ~= nil then
- errorlevel = allmodules("cmdcheck")
+ errorlevel = call(modules, "cmdcheck")
elseif target == "ctan" then
errorlevel = ctan()
elseif target == "install" then
- errorlevel = allmodules("install")
+ errorlevel = call(modules, "install")
elseif target == "setversion" then
- errorlevel = allmodules("setversion")
+ errorlevel = call(modules, "setversion")
-- Deal with any files in the bundle dir itself
if errorlevel == 0 then
errorlevel = setversion()
end
elseif target == "unpack" then
- errorlevel = allmodules("bundleunpack")
+ errorlevel = call(modules, "bundleunpack")
elseif target == "version" then
version()
else
diff --git a/Master/texmf-dist/tex/latex/l3build/regression-test.tex b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
index eae274e09f6..4c12a1d5444 100644
--- a/Master/texmf-dist/tex/latex/l3build/regression-test.tex
+++ b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
@@ -101,30 +101,29 @@
============================================================%
}%
}
-\long\def\TEST#1#2{%
+\protected\long\def\BEGINTEST#1{%
\global\advance\gTESTint by 1 %
\SEPARATOR
\LONGTYPEOUT{TEST \the\gTESTint: \detokenize{#1}}%
\SEPARATOR
\begingroup
\let\TYPE\LONGTYPEOUT
- #2%
+
+}
+\protected\long\def\ENDTEST{%
\endgroup
\SEPARATOR
\LONGTYPEOUT{}%
}
+\long\def\TEST#1#2{%
+ \BEGINTEST{#1}%
+ #2%
+ \ENDTEST
+}
\long\def\TESTEXP#1#2{%
- \global\advance\gTESTint by 1 %
- \SEPARATOR
- \LONGTYPEOUT{%
- TEST \the\gTESTint: \detokenize{#1}}%
- \SEPARATOR
- \begingroup
- \long\def\TYPE##1{##1}%
- \LONGTYPEOUT{#2}%
- \endgroup
- \SEPARATOR
- \LONGTYPEOUT{}%
+ \BEGINTEST{#1}%
+ \LONGTYPEOUT{#2}%
+ \ENDTEST
}
\def \TRUE {\TYPE{TRUE}}
\def \FALSE {\TYPE{FALSE}}