[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add test files for the map_tokens family of functions (8f956491d)

Bruno Le Floch bruno at le-floch.fr
Thu Jul 16 22:17:15 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/8f956491dd840d9b4defd266f04f0e9c816a1787

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

commit 8f956491dd840d9b4defd266f04f0e9c816a1787
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Thu Jul 16 22:17:15 2020 +0200

    Add test files for the map_tokens family of functions


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

8f956491dd840d9b4defd266f04f0e9c816a1787
 l3kernel/testfiles/m3prop003.lvt | 3 ++-
 l3kernel/testfiles/m3seq008.lvt  | 3 ++-
 l3kernel/testfiles/m3tl002.lvt   | 3 +++
 l3kernel/testfiles/m3tl002.tlg   | 1 +
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/l3kernel/testfiles/m3prop003.lvt b/l3kernel/testfiles/m3prop003.lvt
index 271e7fdde..575fa2955 100644
--- a/l3kernel/testfiles/m3prop003.lvt
+++ b/l3kernel/testfiles/m3prop003.lvt
@@ -158,7 +158,8 @@
     { > \tl_to_str:n {#1} --- \tl_to_str:n {#2} < \NEWLINE }
 \TIMO
 \TESTEXP { map_tokens }
-  { \prop_map_tokens:Nn \l_a_prop { \test:nn } }
+  { \prop_map_tokens:Nn \l_a_prop { \prg_break_point: \test:nn } }
+% \prg_break_point: is just there to check the user code is wrapped in \use:n or similar
 
 \TESTEXP { item }
   {
diff --git a/l3kernel/testfiles/m3seq008.lvt b/l3kernel/testfiles/m3seq008.lvt
index 96bac8afb..3b85dcf4f 100644
--- a/l3kernel/testfiles/m3seq008.lvt
+++ b/l3kernel/testfiles/m3seq008.lvt
@@ -79,9 +79,10 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+% \prg_break_point: is just there to check the user code is wrapped in \use:n or similar
 \TEST { seq_map_tokens:Nn }
   {
-    \seq_map_tokens:Nn \l_tmpa_seq { \test:nn { A } }
+    \seq_map_tokens:Nn \l_tmpa_seq { \prg_break_point: \test:nn { A } }
     \SEPARATOR
     \seq_map_tokens:Nn \l_tmpb_seq { \test:nn { A } }
     \SEPARATOR
diff --git a/l3kernel/testfiles/m3tl002.lvt b/l3kernel/testfiles/m3tl002.lvt
index ec3ead92f..07036e126 100644
--- a/l3kernel/testfiles/m3tl002.lvt
+++ b/l3kernel/testfiles/m3tl002.lvt
@@ -110,6 +110,9 @@
 
 \TESTEXP{map_break~function}{
   \tl_map_function:NN \l_tmpa_tl \tl_tmp:n
+  \NEWLINE
+  \tl_map_tokens:Nn \l_tmpa_tl
+    { \TRUE \tl_tmp:n }
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/l3kernel/testfiles/m3tl002.tlg b/l3kernel/testfiles/m3tl002.tlg
index b160b4504..414a6ff46 100644
--- a/l3kernel/testfiles/m3tl002.tlg
+++ b/l3kernel/testfiles/m3tl002.tlg
@@ -63,6 +63,7 @@ Final: [z]
 TEST 8: map_break function
 ============================================================
 [a][bb][c][d]
+TRUE[a]TRUE[bb]TRUE[c]TRUE[d]TRUE
 ============================================================
 ============================================================
 TEST 9: remove_once





More information about the latex3-commits mailing list.