[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use str not cs test for case-change exclusion (ce1ae7e42)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Sep 1 11:10:19 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/ce1ae7e42bab5afeac1be4e02295248c01cb8b44
>---------------------------------------------------------------
commit ce1ae7e42bab5afeac1be4e02295248c01cb8b44
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Sep 1 10:04:51 2020 +0100
Use str not cs test for case-change exclusion
As for d8588c but at the case-change stage.
>---------------------------------------------------------------
ce1ae7e42bab5afeac1be4e02295248c01cb8b44
l3kernel/CHANGELOG.md | 2 ++
l3kernel/l3text-case.dtx | 2 +-
l3kernel/testfiles/m3text002.luatex.tlg | 11 +++++++++++
l3kernel/testfiles/m3text002.lvt | 13 +++++++++++++
l3kernel/testfiles/m3text002.tlg | 11 +++++++++++
l3kernel/testfiles/m3text002.uptex.tlg | 11 +++++++++++
l3kernel/testfiles/m3text002.xetex.tlg | 11 +++++++++++
7 files changed, 60 insertions(+), 1 deletion(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 0c84ed35f..2cc69a9ed 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -19,6 +19,8 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- `\file_compare_timestamp:nNn(TF)` in LuaTeX (issue #792)
+- Text case changing and expansion where an excluded command is equivalent
+ to `\use:n`
## [2020-08-07]
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 0f56576b2..db026ee97 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -408,7 +408,7 @@
{
\@@_if_recursion_tail_stop_do:Nn #4
{ \use:c { @@_change_case_letterlike_ #1 :nnN } {#1} {#2} #3 }
- \cs_if_eq:NNTF #3 #4
+ \str_if_eq:nnTF {#3} {#4}
{
\@@_use_i_delimit_by_q_recursion_stop:nw
{ \@@_change_case_exclude:nnNn {#1} {#2} #3 }
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index 3ad33a3d1..32668ebc7 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -275,3 +275,14 @@ TEST 25: Active chars
"`Lo"=rem"'
"`Lo"=rem"'
============================================================
+============================================================
+TEST 26: Case changing exclusions
+============================================================
+Defining \tl_show:x on line ...
+> foo\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+> \use:n {foo}\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+============================================================
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index 9a01ccf37..c2108a917 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -300,4 +300,17 @@
\group_end:
+\TEST { Case~changing~exclusions }
+ {
+ \cs_generate_variant:Nn \tl_show:n { x }
+ \tl_put_right:Nn \l_text_expand_exclude_tl { \NoCaseChange }
+ \tl_put_right:Nn \l_text_case_exclude_arg_tl { \NoCaseChange }
+ \cs_set_eq:NN \NoCaseChange \use:n
+ \tl_show:x
+ { \text_lowercase:n { \use:n { FOO } \NoCaseChange { BAR } } }
+ \tl_put_right:Nn \l_text_expand_exclude_tl { \use:n }
+ \tl_show:x
+ { \text_lowercase:n { \use:n { FOO } \NoCaseChange { BAR } } }
+ }
+
\END
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index f2378a713..6473d73e5 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -267,3 +267,14 @@ TEST 25: Active chars
"`lo"=rem"'
"`Lo"=rem"'
============================================================
+============================================================
+TEST 26: Case changing exclusions
+============================================================
+Defining \tl_show:x on line ...
+> foo\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+> \use:n {foo}\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+============================================================
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index f8211f22c..eb8fb782f 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -271,3 +271,14 @@ TEST 25: Active chars
"`lo"=rem"'
"`Lo"=rem"'
============================================================
+============================================================
+TEST 26: Case changing exclusions
+============================================================
+Defining \tl_show:x on line ...
+> foo\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+> \use:n {foo}\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+============================================================
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index 58819281a..435b93cdd 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -271,3 +271,14 @@ TEST 25: Active chars
"`Lo"=rem"'
"`Lo"=rem"'
============================================================
+============================================================
+TEST 26: Case changing exclusions
+============================================================
+Defining \tl_show:x on line ...
+> foo\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+> \use:n {foo}\NoCaseChange {BAR}.
+<recently read> }
+l. ... }
+============================================================
More information about the latex3-commits
mailing list.