[latex3-commits] [git/LaTeX3-latex3-l3build] master: Add checkinit_hook() (4437867)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Sep 17 14:53:33 CEST 2019


Repository : https://github.com/latex3/l3build
On branch  : master
Link       : https://github.com/latex3/l3build/commit/4437867cfa3786f5df70fd11612d4d8b3a50ab99

>---------------------------------------------------------------

commit 4437867cfa3786f5df70fd11612d4d8b3a50ab99
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Sep 17 13:53:33 2019 +0100

    Add checkinit_hook()


>---------------------------------------------------------------

4437867cfa3786f5df70fd11612d4d8b3a50ab99
 CHANGELOG.md      | 4 ++++
 l3build-check.lua | 3 +++
 l3build.dtx       | 6 ++++++
 3 files changed, 13 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51aceb3..e1a0841 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+
+- `checkinit_hook()`
+
 ## [2019-09-14]
 
 ### Changed
diff --git a/l3build-check.lua b/l3build-check.lua
index c05defc..8d1d58a 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -81,8 +81,11 @@ function checkinit()
     cp(i, supportdir, testdir)
   end
   execute(os_ascii .. ">" .. testdir .. "/ascii.tcx")
+  return checkinit_hook()
 end
 
+checkinit_hook = checkinit_hook or function() return 0 end
+
 local function rewrite(source,result,processor,...)
   local file = assert(open(source,"rb"))
   local content = gsub(file:read("*all") .. "\n","\r\n","\n")
diff --git a/l3build.dtx b/l3build.dtx
index 81e3be4..91699e3 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -1082,6 +1082,12 @@
 % \END
 % \end{Verbatim}
 %
+% \subsection{Pre-check hook}
+%
+% To allow complex set up for tests, a hook |checkinit_hook()| is available
+% to be executed once all standard set up is complete but before any tests
+% are run.
+%
 % \subsection{Additional test tasks}
 %
 % A standard test will run the file \texttt{\meta{name}.lvt} using one





More information about the latex3-commits mailing list