[latex3-commits] [git/LaTeX3-latex3-l3build] new-types: Use metatable-less default for test_types (3da97df)

Marcel Fabian Krüger tex at 2krueger.de
Sat Feb 20 18:59:52 CET 2021


Repository : https://github.com/latex3/l3build
On branch  : new-types
Link       : https://github.com/latex3/l3build/commit/3da97dfd4a305732fcc51f5cfcc5b5dbe05f7731

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

commit 3da97dfd4a305732fcc51f5cfcc5b5dbe05f7731
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Dec 5 14:37:13 2020 +0100

    Use metatable-less default for test_types


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

3da97dfd4a305732fcc51f5cfcc5b5dbe05f7731
 l3build-variables.lua | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/l3build-variables.lua b/l3build-variables.lua
index 090d259..e3ae64e 100644
--- a/l3build-variables.lua
+++ b/l3build-variables.lua
@@ -207,22 +207,22 @@ pvtext = pvtext or ".pvt"
 tlgext = tlgext or ".tlg"
 tpfext = tpfext or ".tpf"
 
-test_types = setmetatable(test_types or {}, { __index = {
-   log = {
-      test = lvtext,
-      generated = logext,
-      reference = tlgext,
-      expectation = lveext,
-      compare = compare_tlg,
-      rewrite = rewrite_log,
-   },
-   pdf = {
-      test = pvtext,
-      generated = pdfext,
-      reference = tpfext,
-      rewrite = rewrite_pdf,
-   },
-}})
+test_types = test_types or { }
+test_types.log = test_types.log or {
+  test = lvtext,
+  generated = logext,
+  reference = tlgext,
+  expectation = lveext,
+  compare = compare_tlg,
+  rewrite = rewrite_log,
+}
+test_types.pdf = test_types.pdf or {
+  test = pvtext,
+  generated = pdfext,
+  reference = tpfext,
+  rewrite = rewrite_pdf,
+}
+
 test_order = test_order or {"log", "pdf"}
 
 -- Manifest options





More information about the latex3-commits mailing list.