[latex3-commits] [latex3/latex2e] develop: Add base/config-templates.lua to CI (f61d427d7)

github at latex-project.org github at latex-project.org
Mon Nov 4 15:50:09 CET 2024


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/f61d427d7b3f023ffd5b57b6c974b4e81b61d61d

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

commit f61d427d7b3f023ffd5b57b6c974b4e81b61d61d
Author: Yukai Chou <muzimuzhi at gmail.com>
Date:   Mon Nov 4 22:04:23 2024 +0800

    Add base/config-templates.lua to CI


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

f61d427d7b3f023ffd5b57b6c974b4e81b61d61d
 .github/workflows/main.yaml                   |  2 +
 .github/workflows/pretest.yaml                |  2 +
 base/testfiles-lttemplates/lttemplates001.tlg | 15 +++----
 base/testfiles-lttemplates/lttemplates003.tlg | 63 +++++++++------------------
 base/testfiles-lttemplates/lttemplates004.tlg | 18 +++-----
 base/testfiles-lttemplates/lttemplates007.tlg |  3 +-
 6 files changed, 37 insertions(+), 66 deletions(-)

diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index fb4552859..c0e6e8f59 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -84,6 +84,8 @@ jobs:
             config: config-lthooks2
           - module: base
             config: config-ltmarks
+          - module: base
+            config: config-lttemplates
           - module: required/amsmath
           - module: required/cyrillic
           - module: required/firstaid
diff --git a/.github/workflows/pretest.yaml b/.github/workflows/pretest.yaml
index 3bbdf3ece..17011f4e7 100644
--- a/.github/workflows/pretest.yaml
+++ b/.github/workflows/pretest.yaml
@@ -60,6 +60,8 @@ jobs:
             config: config-lthooks2
           - module: base
             config: config-ltmarks
+          - module: base
+            config: config-lttemplates
           - module: required/amsmath
           - module: required/cyrillic
           - module: required/firstaid
diff --git a/base/testfiles-lttemplates/lttemplates001.tlg b/base/testfiles-lttemplates/lttemplates001.tlg
index e033b1c49..bccc637db 100644
--- a/base/testfiles-lttemplates/lttemplates001.tlg
+++ b/base/testfiles-lttemplates/lttemplates001.tlg
@@ -4,12 +4,9 @@ Author: Joseph Wright
 ============================================================
 TEST 1: Making object types
 ============================================================
-LaTeX template Info: Declaring template type 'test-0' taking 0 argument(s) on
-(template)           line 27.
-LaTeX template Info: Declaring template type 'test-1' taking 1 argument(s) on
-(template)           line 27.
-LaTeX template Info: Declaring template type 'test-2' taking 2 argument(s) on
-(template)           line 27.
+LaTeX template Info: Declaring template type 'test-0' taking 0 argument(s) on line ....
+LaTeX template Info: Declaring template type 'test-1' taking 1 argument(s) on line ....
+LaTeX template Info: Declaring template type 'test-2' taking 2 argument(s) on line ....
 ============================================================
 ============================================================
 TEST 2: Template interfaces: correct
@@ -35,15 +32,13 @@ For immediate help type H <return>.
  ...                                              
 l. ...}
 Templates of type 'test-one' require 1 argument(s).
-You have tried to make a template for 'test-one' with 2 argument(s), which is
-not possible: the number of arguments must agree.
+You have tried to make a template for 'test-one' with 2 argument(s), which is not possible: the number of arguments must agree.
 ! LaTeX template Error: Template type 'test-two' takes 2 argument(s).
 For immediate help type H <return>.
  ...                                              
 l. ...}
 Templates of type 'test-two' require 2 argument(s).
-You have tried to make a template for 'test-two' with 0 argument(s), which is
-not possible: the number of arguments must agree.
+You have tried to make a template for 'test-two' with 0 argument(s), which is not possible: the number of arguments must agree.
 ! LaTeX template Error: The template type 'undeclared' is unknown.
 For immediate help type H <return>.
  ...                                              
diff --git a/base/testfiles-lttemplates/lttemplates003.tlg b/base/testfiles-lttemplates/lttemplates003.tlg
index 33cdf6ceb..6fb136da0 100644
--- a/base/testfiles-lttemplates/lttemplates003.tlg
+++ b/base/testfiles-lttemplates/lttemplates003.tlg
@@ -4,14 +4,12 @@ Author: Frank Mittelbach
 ============================================================
 TEST 1: Testing object types
 ============================================================
-LaTeX template Info: Declaring template type 'ok' taking 3 argument(s) on line
-(template)           ....
+LaTeX template Info: Declaring template type 'ok' taking 3 argument(s) on line ....
 ! LaTeX template Error: Template type 'ok' already defined.
 For immediate help type H <return>.
  ...                                              
 l. ...}
-You have used \NewTemplateType with a template type that has already been
-defined.
+You have used \NewTemplateType with a template type that has already been defined.
 ! LaTeX template Error: Bad number of arguments for template type 'too-big'.
 For immediate help type H <return>.
  ...                                              
@@ -38,15 +36,13 @@ A template type needs to be defined with \NewTemplateType prior to using it.
 ============================================================
 TEST 2: Testing object types argument values
 ============================================================
-LaTeX template Info: Declaring template type 'now-defined' taking 2
-(template)           argument(s) on line ....
+LaTeX template Info: Declaring template type 'now-defined' taking 2 argument(s) on line ....
 ! LaTeX template Error: Template type 'now-defined' takes 2 argument(s).
 For immediate help type H <return>.
  ...                                              
 l. ...}
 Templates of type 'now-defined' require 2 argument(s).
-You have tried to make a template for 'now-defined' with 1 argument(s), which
-is not possible: the number of arguments must agree.
+You have tried to make a template for 'now-defined' with 1 argument(s), which is not possible: the number of arguments must agree.
 ============================================================
 ============================================================
 TEST 3: Testing key types and names
@@ -90,8 +86,7 @@ but LaTeX could not find a <key-type>.
 ============================================================
 TEST 4: Testing key names
 ============================================================
-! LaTeX template Error: Key 'key' appears twice in interface definition on
-(template)              line 115.
+! LaTeX template Error: Key 'key' appears twice in interface definition on line ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -101,8 +96,7 @@ The template 'tname6' of type 'test' has interface:
 >  key  =>  integer.
 <recently read> }
 l. ...}
-! LaTeX template Error: The template 'tname6' of type 'test' is unknown or has
-(template)              no implementation.
+! LaTeX template Error: The template 'tname6' of type 'test' is unknown or has no implementation.
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -112,24 +106,21 @@ This should be given using \DeclareTemplateCode .
 ============================================================
 TEST 5: Testing incomplete key types
 ============================================================
-! LaTeX template Error: The key type 'choice' requires an argument on line
-(template)              ....
+! LaTeX template Error: The key type 'choice' requires an argument on line ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
 You should have put:
   <key-name> : choice { <argument> }
 but LaTeX did not find an <argument>.
-! LaTeX template Error: The key type 'function' requires an argument on line
-(template)              ....
+! LaTeX template Error: The key type 'function' requires an argument on line ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
 You should have put:
   <key-name> : function { <argument> }
 but LaTeX did not find an <argument>.
-! LaTeX template Error: The key type 'instance' requires an argument on line
-(template)              ....
+! LaTeX template Error: The key type 'instance' requires an argument on line ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -168,14 +159,12 @@ For immediate help type H <return>.
  ...                                              
 l. ... }
 Templates of type 'test' require 1 argument(s).
-You have tried to make a template for 'test' with 10 argument(s), which is not
-possible: the number of arguments must agree.
+You have tried to make a template for 'test' with 10 argument(s), which is not possible: the number of arguments must agree.
 ============================================================
 ============================================================
 TEST 8: Same template name different types
 ============================================================
-LaTeX template Info: Declaring template type 'also-ok' taking 2 argument(s) on
-(template)           line 166.
+LaTeX template Info: Declaring template type 'also-ok' taking 2 argument(s) on line ....
 ============================================================
 ============================================================
 TEST 9: Testing key defaults
@@ -206,8 +195,7 @@ For immediate help type H <return>.
  ...                                              
 l. ...}
 Templates of type 'test' require 1 argument(s).
-You have tried to make a template for 'test' with 2 argument(s), which is not
-possible: the number of arguments must agree.
+You have tried to make a template for 'test' with 2 argument(s), which is not possible: the number of arguments must agree.
 > \template code > test/tname11=undefined.
 <recently read> }
 l. ...}
@@ -221,10 +209,8 @@ Defining key template/test/tname12/key1 on line ...
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The definition of key implementations for template 'tname12' of template type
-'test' does not include any details for key 'key2'.
-The key was declared in the interface definition, and so an implementation is
-required.
+The definition of key implementations for template 'tname12' of template type 'test' does not include any details for key 'key2'.
+The key was declared in the interface definition, and so an implementation is required.
 ! LaTeX template Error: The template attribute 'key2' is unknown.
 For immediate help type H <return>.
  ...                                              
@@ -245,8 +231,7 @@ TEST 13: Testing code interface: missing var declarations
 Defining key template/test/tname14/key1 on line ...
 Defining \l_Y_tl on line ...
 Defining key template/test/tname14/key2 on line ...
-> \template code > test/tname14=\protected\long macro:#1->\AssignTemplateKeys
-.
+> \template code > test/tname14=\protected\long macro:#1->\AssignTemplateKeys .
 <recently read> }
 l. ...}
 The template 'tname14' of type 'test' has variable mapping:
@@ -269,8 +254,7 @@ or
 'global <variable>'.
 It must be given in one of these formats to be used in a template.
 Defining key template/test/tname15/key3 on line ...
-> \template code > test/tname15=\protected\long macro:#1->\AssignTemplateKeys
-.
+> \template code > test/tname15=\protected\long macro:#1->\AssignTemplateKeys .
 <recently read> }
 l. ...}
 The template 'tname15' of type 'test' has variable mapping:
@@ -290,8 +274,7 @@ Defining key template/test/tname16/key on line ...
 Defining key template/test/tname16/key/unknown on line ...
 Defining key template/test/tname16/key/A on line ...
 Defining key template/test/tname16/key/B on line ...
-> \template code > test/tname16=\protected\long macro:#1->\AssignTemplateKeys
-.
+> \template code > test/tname16=\protected\long macro:#1->\AssignTemplateKeys .
 <recently read> }
 l. ...}
 The template 'tname16' of type 'test' has variable mapping:
@@ -312,8 +295,7 @@ No
 ============================================================
 TEST 18: Testing instances: declare instance
 ============================================================
-! LaTeX template Error: The template 'never-defined' of type 'test' is unknown
-(template)              or has no implementation.
+! LaTeX template Error: The template 'never-defined' of type 'test' is unknown or has no implementation.
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -403,11 +385,9 @@ huh
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The key 'key' takes a fixed list of choices and this list does not include
-'1'.
+The key 'key' takes a fixed list of choices and this list does not include '1'.
 LaTeX template Info: Declaring instance 'myinstance' of type test on line ....
-! LaTeX template Error: The instance 'myinstance' of type 'notdefined' is
-(template)              unknown.
+! LaTeX template Error: The instance 'myinstance' of type 'notdefined' is unknown.
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -416,8 +396,7 @@ You have asked to use an instance 'myinstance', but this has not been created.
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The key 'key' takes a fixed list of choices and this list does not include
-'1'.
+The key 'key' takes a fixed list of choices and this list does not include '1'.
 LaTeX template Info: Declaring instance 'myinstance' of type test on line ....
 LaTeX template Info: Declaring instance 'myinstance' of type test on line ....
 hello
diff --git a/base/testfiles-lttemplates/lttemplates004.tlg b/base/testfiles-lttemplates/lttemplates004.tlg
index 007fedb99..724906c61 100644
--- a/base/testfiles-lttemplates/lttemplates004.tlg
+++ b/base/testfiles-lttemplates/lttemplates004.tlg
@@ -4,31 +4,25 @@ Author: Frank Mittelbach
 ============================================================
 TEST 1: Testing code interface: choices
 ============================================================
-! LaTeX template Error: The default choice 'key' was not declared for key
-(template)              'key'.
+! LaTeX template Error: The default choice 'key' was not declared for key 'key'.
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The key 'key' takes a fixed list of choices and this list does not include
-'key'.
+The key 'key' takes a fixed list of choices and this list does not include 'key'.
 Hi
 hello
 huh
 Hi
-! LaTeX template Error: The default choice 'key' was not declared for key
-(template)              'key'.
+! LaTeX template Error: The default choice 'key' was not declared for key 'key'.
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The key 'key' takes a fixed list of choices and this list does not include
-'key'.
-! LaTeX template Error: The choice 'don'tsayhi' was not declared for key
-(template)              'key'.
+The key 'key' takes a fixed list of choices and this list does not include 'key'.
+! LaTeX template Error: The choice 'don'tsayhi' was not declared for key 'key'.
 For immediate help type H <return>.
  ...                                              
 l. ...}
-The key 'key' takes a fixed list of choices and this list does not include
-'don'tsayhi'.
+The key 'key' takes a fixed list of choices and this list does not include 'don'tsayhi'.
 hello
 huh
 ============================================================
diff --git a/base/testfiles-lttemplates/lttemplates007.tlg b/base/testfiles-lttemplates/lttemplates007.tlg
index f6a662bef..1d45b9e34 100644
--- a/base/testfiles-lttemplates/lttemplates007.tlg
+++ b/base/testfiles-lttemplates/lttemplates007.tlg
@@ -8,6 +8,5 @@ TEST 1: Erroneous types
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-You have used \NewTemplateType with a template type that has already been
-defined.
+You have used \NewTemplateType with a template type that has already been defined.
 ============================================================





More information about the latex3-commits mailing list.