[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add test for https://github.com/latex3/latex2e/issues/351 (5da6bb56e)

Bruno Le Floch blflatex at gmail.com
Tue Jul 21 12:15:41 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/5da6bb56e4aac67d4afbbbcf120f9a0969971006

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

commit 5da6bb56e4aac67d4afbbbcf120f9a0969971006
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Tue Jul 21 11:50:32 2020 +0200

    Add test for https://github.com/latex3/latex2e/issues/351
    
    (Not sure why that issue was in our LaTeX2e tracker instead of in
    LaTeX3.)  This test purposefully does not show truncation per se,
    because that would require an annoying LuaTeX-specific tlg.  If
    the key name was longer the undefined control sequence would be
    pushed to the end of the line and end up being truncated by TeX.


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

5da6bb56e4aac67d4afbbbcf120f9a0969971006
 l3kernel/testfiles/m3keys004.lvt | 12 ++++++++++++
 l3kernel/testfiles/m3keys004.tlg | 20 ++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/l3kernel/testfiles/m3keys004.lvt b/l3kernel/testfiles/m3keys004.lvt
index ecfa37640..72391d90c 100644
--- a/l3kernel/testfiles/m3keys004.lvt
+++ b/l3kernel/testfiles/m3keys004.lvt
@@ -319,5 +319,17 @@
     \keys_show:nn { module-a } { key-one }
   }
 
+\TEST { Undefined~error~in~code }
+  {
+    \keys_define:nn { module }
+      {
+        key-one .code:n = { #1 \undefinedB }
+      }
+    \keys_set:nn { module }
+      {
+        key-one   = \undefinedA
+      }
+  }
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \END
diff --git a/l3kernel/testfiles/m3keys004.tlg b/l3kernel/testfiles/m3keys004.tlg
index a5d0d31f0..f14ad85a7 100644
--- a/l3kernel/testfiles/m3keys004.tlg
+++ b/l3kernel/testfiles/m3keys004.tlg
@@ -203,3 +203,23 @@ The key module-a/key-one is undefined.
 <recently read> }
 l. ...  }
 ============================================================
+============================================================
+TEST 12: Undefined error in code
+============================================================
+! Undefined control sequence.
+<argument> \undefinedA 
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+\key code > module/key-one #1->#1\undefinedB 
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+============================================================





More information about the latex3-commits mailing list.