[latex3-commits] [git/LaTeX3-latex3-latex3] master: Test that str/other cctab have the right catcodes (b62b1b6a5)

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/b62b1b6a5b68fc5486c2f1c25a311b695c5060a1

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

commit b62b1b6a5b68fc5486c2f1c25a311b695c5060a1
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Thu Jul 2 00:15:16 2020 +0200

    Test that str/other cctab have the right catcodes


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

b62b1b6a5b68fc5486c2f1c25a311b695c5060a1
 l3kernel/testfiles/m3cctab001.lvt | 19 +++++++++++++++++++
 l3kernel/testfiles/m3cctab001.tlg |  7 +++++++
 2 files changed, 26 insertions(+)

diff --git a/l3kernel/testfiles/m3cctab001.lvt b/l3kernel/testfiles/m3cctab001.lvt
index bf8372bd1..873faf1d3 100644
--- a/l3kernel/testfiles/m3cctab001.lvt
+++ b/l3kernel/testfiles/m3cctab001.lvt
@@ -135,6 +135,8 @@
       { \TYPE { OK } } { \TYPE { Sob~T_T~\l__test_tl } }
   }
 
+% ==================================================
+
 \OMIT
 \cs_new_protected:Npn \test_XYZ:Nn #1#2
   {
@@ -171,6 +173,23 @@
     \test_XYZ:Nn \c_str_cctab { 12 }
   }
 
+% ==================================================
+
+\TEST { str/other~cctab }
+  {
+    \tl_set_rescan:Nnn \l_tmpa_tl
+      { \cctab_select:N \c_str_cctab }
+      { abc~def $ $ ^ & _ { } }
+    \use:x { \tl_if_eq:nnTF { \tl_to_str:N \l_tmpa_tl } { \l_tmpa_tl } }
+      { \TRUE } { \ERROR }
+    \tl_set_rescan:Nnn \l_tmpb_tl
+      { \cctab_select:N \c_other_cctab }
+      { abc~def $ $ ^ & _ { } }
+    \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl { \ERROR } { \FALSE }
+    \use:x { \tl_replace_all:Nnn \exp_not:N \l_tmpa_tl { ~ } { \c_catcode_other_space_tl } }
+    \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl { \TRUE } { \ERROR }
+  }
+
 \ExplSyntaxOff
 
 \END
diff --git a/l3kernel/testfiles/m3cctab001.tlg b/l3kernel/testfiles/m3cctab001.tlg
index 8dc56818b..ba2a44fec 100644
--- a/l3kernel/testfiles/m3cctab001.tlg
+++ b/l3kernel/testfiles/m3cctab001.tlg
@@ -36,3 +36,10 @@ TRUE
 TRUE
 TRUE
 ============================================================
+============================================================
+TEST 7: str/other cctab
+============================================================
+TRUE
+FALSE
+TRUE
+============================================================





More information about the latex3-commits mailing list.