[latex3-commits] [git/LaTeX3-latex3-latex3] master: l3cctab: Test showing catcodetables are wrongly reused (9bbe11f4f)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jul 16 12:13:16 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/9bbe11f4fc9377e6deef95bc37bac1b2050394de

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

commit 9bbe11f4fc9377e6deef95bc37bac1b2050394de
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Wed Jul 1 08:06:51 2020 +0200

    l3cctab: Test showing catcodetables are wrongly reused


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

9bbe11f4fc9377e6deef95bc37bac1b2050394de
 .../{m3cctab001.tlg => m3cctab001.luatex.tlg}      | 17 +++++++++-
 l3kernel/testfiles/m3cctab001.lvt                  | 38 +++++++++++++++++++++-
 l3kernel/testfiles/m3cctab001.tlg                  | 11 ++++++-
 3 files changed, 63 insertions(+), 3 deletions(-)

diff --git a/l3kernel/testfiles/m3cctab001.tlg b/l3kernel/testfiles/m3cctab001.luatex.tlg
similarity index 74%
copy from l3kernel/testfiles/m3cctab001.tlg
copy to l3kernel/testfiles/m3cctab001.luatex.tlg
index 535277779..df2ea4fdd 100644
--- a/l3kernel/testfiles/m3cctab001.tlg
+++ b/l3kernel/testfiles/m3cctab001.luatex.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the LaTeX (2e + expl3) validation system.
 Don't change this file in any respect.
-Author: Phelype Oleinik
+Author: Phelype Oleinik, Bruno Le Floch
 ============================================================
 TEST 1: cctab_begin/code in iniTeX
 ============================================================
@@ -27,3 +27,18 @@ TEST 5: cctab_select/document in str
 ============================================================
 OK
 ============================================================
+============================================================
+TEST 6: catcode assignments don't change cctab
+============================================================
+TRUE
+! Undefined control sequence.
+<argument> \ERROR 
+l. ...  }
+? 
+TRUE
+! Undefined control sequence.
+<argument> \ERROR 
+l. ...  }
+? 
+TRUE
+============================================================
diff --git a/l3kernel/testfiles/m3cctab001.lvt b/l3kernel/testfiles/m3cctab001.lvt
index 837e0b852..bf8372bd1 100644
--- a/l3kernel/testfiles/m3cctab001.lvt
+++ b/l3kernel/testfiles/m3cctab001.lvt
@@ -11,7 +11,7 @@
 \ExplSyntaxOff
 
 \START
-\AUTHOR{Phelype Oleinik}
+\AUTHOR{Phelype Oleinik, Bruno Le Floch}
 
 \ExplSyntaxOn
 
@@ -135,6 +135,42 @@
       { \TYPE { OK } } { \TYPE { Sob~T_T~\l__test_tl } }
   }
 
+\OMIT
+\cs_new_protected:Npn \test_XYZ:Nn #1#2
+  {
+    \cctab_begin:N #1
+      \int_compare:nTF
+        {
+          #2
+          = \char_value_catcode:n { `\X }
+          = \char_value_catcode:n { `\Y }
+          = \char_value_catcode:n { `\Z }
+        }
+        { \TRUE } { \ERROR }
+    \cctab_end:
+  }
+\TIMO
+
+\TEST { catcode~assignments~don't~change~cctab }
+  {
+    \cctab_begin:N \c_str_cctab
+      \cctab_begin:N \c_initex_cctab
+        \char_set_catcode_comment:N \X
+        \cctab_begin:N \c_document_cctab
+          \char_set_catcode_comment:N \Y
+          \cctab_begin:N \c_other_cctab
+            \char_set_catcode_comment:N \Z
+          \cctab_end:
+        \cctab_end:
+      \cctab_end:
+    \cctab_end:
+    \test_XYZ:Nn \c_initex_cctab { 11 }
+    \test_XYZ:Nn \c_code_cctab { 11 }
+    \test_XYZ:Nn \c_document_cctab { 11 }
+    \test_XYZ:Nn \c_other_cctab { 12 }
+    \test_XYZ:Nn \c_str_cctab { 12 }
+  }
+
 \ExplSyntaxOff
 
 \END
diff --git a/l3kernel/testfiles/m3cctab001.tlg b/l3kernel/testfiles/m3cctab001.tlg
index 535277779..8dc56818b 100644
--- a/l3kernel/testfiles/m3cctab001.tlg
+++ b/l3kernel/testfiles/m3cctab001.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the LaTeX (2e + expl3) validation system.
 Don't change this file in any respect.
-Author: Phelype Oleinik
+Author: Phelype Oleinik, Bruno Le Floch
 ============================================================
 TEST 1: cctab_begin/code in iniTeX
 ============================================================
@@ -27,3 +27,12 @@ TEST 5: cctab_select/document in str
 ============================================================
 OK
 ============================================================
+============================================================
+TEST 6: catcode assignments don't change cctab
+============================================================
+TRUE
+TRUE
+TRUE
+TRUE
+TRUE
+============================================================





More information about the latex3-commits mailing list.