[latex3-commits] [latex3/latex3] gh1232-titlecase: Add \text_sentencecase:n(n) (1880bf651)

github at latex-project.org github at latex-project.org
Tue Jun 27 23:48:44 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : gh1232-titlecase
Link       : https://github.com/latex3/latex3/commit/1880bf65116df6dddb7e26f469cf2cf39328fce1

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

commit 1880bf65116df6dddb7e26f469cf2cf39328fce1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Jun 27 19:35:26 2023 +0100

    Add \text_sentencecase:n(n)


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

1880bf65116df6dddb7e26f469cf2cf39328fce1
 l3kernel/CHANGELOG.md                   |  1 +
 l3kernel/l3text-case.dtx                | 77 +++++++++++++++++++--------------
 l3kernel/l3text.dtx                     |  9 ++--
 l3kernel/testfiles/m3text002.luatex.tlg | 26 +++++++++++
 l3kernel/testfiles/m3text002.lvt        |  4 ++
 l3kernel/testfiles/m3text002.ptex.tlg   | 26 +++++++++++
 l3kernel/testfiles/m3text002.tlg        | 26 +++++++++++
 l3kernel/testfiles/m3text002.uptex.tlg  | 26 +++++++++++
 l3kernel/testfiles/m3text002.xetex.tlg  | 26 +++++++++++
 9 files changed, 186 insertions(+), 35 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index c0c28bd77..98c979cc0 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers.
 
 ### Added
 - `\codepoint_to_category:n`
+- `\text_sentencecase:n(n)`
 
 ### Changed
 - Apply titlecase to each word in input for `\text_titlecase:n(n)`
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 4ac911526..740b197c4 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -78,15 +78,18 @@
 %     \text_lowercase:n,
 %     \text_uppercase:n,
 %     \text_titlecase:n,
-%     \text_titlecase_first:n
+%     \text_titlecase_first:n,
+%     \text_sentencecase:n
 %   }
 % \begin{macro}[EXP]
 %   {
 %     \text_lowercase:nn,
 %     \text_uppercase:nn,
 %     \text_titlecase:nn,
-%     \text_titlecase_first:nn
+%     \text_titlecase_first:nn,
+%     \text_sentencecase:nn
 %   }
+% \begin{macro}[EXP]{\@@_change_case:nnn}
 %   The user level functions here are all wrappers around the internal
 %   functions for case changing.
 %    \begin{macrocode}
@@ -106,19 +109,26 @@
   { \@@_change_case:nnn { title } {#1} {#2} }
 \cs_new:Npn \text_titlecase_first:nn #1#2
   { \@@_change_case:nnn { titleonly } {#1} {#2} }
+\cs_new:Npn \text_sentencecase:n #1
+  { \@@_change_case:nnnn { title } { lower } { } {#1} }
+\cs_new:Npn \text_sentencecase:nn #1#2
+  { \@@_change_case:nnnn { title } { lower } {#1} {#2} }
+\cs_new:Npn \@@_change_case:nnn #1#2#3
+  { \@@_change_case:nnnn {#1} {#1} {#2} {#3} }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}[EXP]
 %   {
-%     \@@_change_case:nnn      ,
-%     \@@_change_case_auxi:nnn ,
-%     \@@_change_case_auxii:nnn
+%     \@@_change_case:nnnn       ,
+%     \@@_change_case_auxi:nnnn  ,
+%     \@@_change_case_auxii:nnnn
 %   }
-% \begin{macro}[EXP]{\@@_change_case_BCP:nnn}
-% \begin{macro}[EXP]{\@@_change_case_BCP:nnw}
+% \begin{macro}[EXP]{\@@_change_case_BCP:nnnn}
 % \begin{macro}[EXP]{\@@_change_case_BCP:nnnnw}
+% \begin{macro}[EXP]{\@@_change_case_BCP:nnnnnw}
 % \begin{macro}[EXP]
 %   {
 %     \@@_change_case_store:n, \@@_change_case_store:o,
@@ -237,45 +247,48 @@
 %   wrap the entire result in exactly one \cs{exp_not:n}, or rather in the
 %   kernel version.
 %    \begin{macrocode}
-\cs_new:Npn \@@_change_case:nnn #1#2#3
+\cs_new:Npn \@@_change_case:nnnn #1#2#3#4
   {
      \__kernel_exp_not:w \exp_after:wN
       {
         \exp:w
-        \exp_args:Ne \@@_change_case_auxi:nnn
-          { \text_expand:n {#3} }
-          {#1} {#2}
+        \exp_args:Ne \@@_change_case_auxi:nnnn
+          { \text_expand:n {#4} }
+          {#1} {#2} {#3}
       }
   }
-\cs_new:Npn \@@_change_case_auxi:nnn #1#2#3
-  { \exp_args:No \@@_change_case_BCP:nnn { \tl_to_str:n {#3} } {#1} {#2} }
-\cs_new:Npx \@@_change_case_BCP:nnn #1#2#3
+\cs_new:Npn \@@_change_case_auxi:nnnn #1#2#3#4
+  {
+    \exp_args:No \@@_change_case_BCP:nnnn
+      { \tl_to_str:n {#4} } {#1} {#2} {#3}
+  }
+\cs_new:Npx \@@_change_case_BCP:nnnn #1#2#3#4
   {
-    \exp_not:N \@@_change_case_BCP:nnw
-      {#2} {#3} #1 \tl_to_str:n { -x- -x- } \exp_not:N \q_@@_stop
+    \exp_not:N \@@_change_case_BCP:nnnw
+      {#2} {#3} {#4} #1 \tl_to_str:n { -x- -x- } \exp_not:N \q_@@_stop
   }
 \use:x
   {
-    \cs_new:Npn \exp_not:N \@@_change_case_BCP:nnw
-      ##1##2##3 \tl_to_str:n { -x- } ##4 \tl_to_str:n { -x- } ##5
+    \cs_new:Npn \exp_not:N \@@_change_case_BCP:nnnw
+      ##1##2##3##4 \tl_to_str:n { -x- } ##5 \tl_to_str:n { -x- } ##6
       \exp_not:N \q_@@_stop
   }
-  { \@@_change_case_BCP:nnnnw {#1} {#2} {#4} {#3} #3 - - \q_@@_stop }
-\cs_new:Npn \@@_change_case_BCP:nnnnw #1#2#3#4#5 - #6 - #7 \q_@@_stop
+  { \@@_change_case_BCP:nnnnnnw {#1} {#2} {#3} {#5} {#4} #4 - \q_@@_stop }
+\cs_new:Npn \@@_change_case_BCP:nnnnnnw #1#2#3#4#5#6 - #7 \q_@@_stop
   {
-    \cs_if_exist:cTF { @@_change_case_ #2 _ #5 -x- #3 :nnnnn }
-      { \@@_change_case_auxii:nnn {#1} {#2} { #5 -x- #3 } }
+    \cs_if_exist:cTF { @@_change_case_ #2 _ #6 -x- #4 :nnnnn }
+      { \@@_change_case_auxii:nnnn {#1} {#2} {#3} { #6 -x- #4 } }
       {
-        \cs_if_exist:cTF { @@_change_case_ #2 _ #5 :nnnnn }
-          { \@@_change_case_auxii:nnn {#1} {#2} {#5} }
-          { \@@_change_case_auxii:nnn {#1} {#2} {#4} }
+        \cs_if_exist:cTF { @@_change_case_ #2 _ #6 :nnnnn }
+          { \@@_change_case_auxii:nnnn {#1} {#2} {#3} {#6} }
+          { \@@_change_case_auxii:nnnn {#1} {#2} {#3} {#5} }
       }
   }
-\cs_new:Npn \@@_change_case_auxii:nnn #1#2#3
+\cs_new:Npn \@@_change_case_auxii:nnnn #1#2#3#4
   {
     \group_align_safe_begin:
-    \cs_if_exist_use:c { @@_change_case_boundary_ #2 _ #3 :Nnnnw }
-    \@@_change_case_loop:nnnw {#2} {#2} {#3} #1
+    \cs_if_exist_use:c { @@_change_case_boundary_ #2 _ #4 :Nnnnw }
+    \@@_change_case_loop:nnnw {#2} {#3} {#4} #1
       \q_@@_recursion_tail \q_@@_recursion_stop
     \@@_change_case_result:n { }
   }
@@ -328,7 +341,7 @@
         \exp_after:wN
           {
             \exp:w
-            \@@_change_case_auxii:nnn {#4} {#1} {#3}
+            \@@_change_case_auxii:nnnn {#4} {#1} {#2} {#3}
           }
       }
     \@@_change_case_loop:nnnw {#1} {#2} {#3}
@@ -342,7 +355,7 @@
         \exp_after:wN
           {
             \exp:w
-            \@@_change_case_auxii:nnn {#4} {#1} {#3}
+            \@@_change_case_auxii:nnnn {#4} {#1} {#2} {#3}
           }
       }
     \@@_change_case_loop:nnnw { lower } {#2} {#3}
@@ -354,7 +367,7 @@
         \exp_after:wN
           {
             \exp:w
-            \@@_change_case_auxii:nnn {#4} {#1} {#3}
+            \@@_change_case_auxii:nnnn {#4} {#1} {#2} {#3}
           }
       }
     \@@_change_case_break:w
@@ -498,7 +511,7 @@
         \@@_change_case_store:o
           {
             \exp_after:wN #4
-              \exp:w \@@_change_case_auxii:nnn {#5} {#1} {#2}
+              \exp:w \@@_change_case_auxii:nnnn {#5} {#1} {#2} {#3}
               {#6}
           }
       }
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 204c13c88..058ee95d9 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -97,15 +97,15 @@
 % \begin{function}[EXP, added = 2019-11-20, updated = 2023-06-27]
 %   {
 %     \text_lowercase:n,  \text_uppercase:n,  \text_titlecase:n,
-%       \text_titlecase_first:n,
+%       \text_titlecase_first:n, \text_sentencecase:n
 %     \text_lowercase:nn, \text_uppercase:nn, \text_titlecase:nn,
-%       \text_titlecase_first:nn
+%       \text_titlecase_first:nn, \text_sentencecase:nn
 %   }
 %   \begin{syntax}
 %     \cs{text_uppercase:n}  \Arg{tokens}
 %     \cs{text_uppercase:nn} \Arg{BCP-47} \Arg{tokens}
 %   \end{syntax}
-%   Takes user input \meta{text} first applies \cs{text_expand}, then
+%   Takes user input \meta{text} first applies \cs{text_expand:nn}, then
 %   transforms the case of character tokens as specified by the
 %   function name. The category code of letters are not changed by this
 %   process when Unicode engines are used; in $8$-bit engines, case changed
@@ -121,6 +121,9 @@
 %   maps to a special form, for example \texttt{ij} in Dutch which becomes
 %   \texttt{IJ}. The \texttt{titlecase_first} variant does not attempt
 %   any case changing at all after the first letter has been processed.
+%   Sentence casing applies titlecasing to the first \meta{word} of the input,
+%   and lowercases the remainder. (See below for details of \meta{word}
+%   division.)
 %
 %   Importantly, notice that these functions are intended for working with
 %   user \emph{text for typesetting}. For case changing programmatic data see
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index 8f9586c10..8bcc8b0ac 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -8,6 +8,7 @@ hello world \par with \ERROR &##
 HELLO WORLD \par WITH \ERROR &##
 Hello World \par With \ERROR &##
 Hello World \par With \ERROR &##
+Hello world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 2: Case changes in braces
@@ -16,6 +17,7 @@ TEST 2: Case changes in braces
 {HELLO} WORLD \par WITH \ERROR &##
 {Hello} World \par With \ERROR &##
 {Hello} world \par with \ERROR &##
+{Hello} world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 3: Case change exclusions
@@ -24,6 +26,7 @@ some text \cite {WithFun}
 SOME TEXT \cite {WithFun}
 Some Text \cite {WithFun}
 Some Text \cite {WithFun}
+Some text \cite {WithFun}
 ============================================================
 ============================================================
 TEST 4: Titlecase basics
@@ -82,10 +85,12 @@ no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 ============================================================
 ============================================================
 TEST 9: (u)pTeX-based tests
@@ -94,6 +99,8 @@ abc^^e8日本語
 ABC^^c8日本語
 Abc^^e8日本語
 ABC^^c8日本語
+Abc^^e8日本語
+一级标题
 一级标题
 一级标题
 一级标题
@@ -106,6 +113,7 @@ TEST 10: Unicode case changing
 ^^c5^^c9^^ce^^d8ὭДΑƐ
 ^^c5^^e9^^ee^^f8ὥдαɛ
 ^^c5^^e9^^ee^^f8ὭдαƐ
+^^c5^^e9^^ee^^f8ὥдαɛ
 ============================================================
 ============================================================
 TEST 11: Unicode case changing exceptions
@@ -114,6 +122,7 @@ fu^^dfball
 FUSSBALL
 Fu^^dfball
 Fu^^dfball
+Fu^^dfball
 ============================================================
 ============================================================
 TEST 12: The final sigma rule
@@ -122,10 +131,12 @@ TEST 12: The final sigma rule
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
 Ὀδυσσεύς (Ὀδυσσεύς) Ὀδυσσεύς, Ὀδυσσεύς{} Ὀδυσσεύς\noop 
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
+Ὀδυσσεύς (ὀδυσσεύς) ὀδυσσεύς, ὀδυσσεύς{} ὀδυσσεύς\noop 
 ὀδυσσεύς
 ὈΔΥΣΣΕΎΣ
 Ὀδυσσεύς
 ὈΔΥΣΣΕΎΣ
+Ὀδυσσεύς
 ============================================================
 ============================================================
 TEST 13: Cyrillic
@@ -134,6 +145,7 @@ TEST 13: Cyrillic
 ДОКЛАДЫ АКАДЕМИИ НАУК
 Доклады Академии Наук
 Доклады Академии Наук
+Доклады академии наук
 ============================================================
 ============================================================
 TEST 14: BCP47 parts
@@ -297,10 +309,12 @@ foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
 Foo \emph {BAR} {Baz}
 FOO \emph {BAR} {BAZ}
+Foo \emph {BAR} {baz}
 \emph {BAR} {baz}
 \emph {BAR} {BAZ}
 \emph {BAR} {Baz}
 \emph {BAR} {BAZ}
+\emph {BAR} {baz}
 ============================================================
 ============================================================
 TEST 24: Expanding content
@@ -309,26 +323,32 @@ some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text \cs_tmp:w 
 SOME TEXT \cs_tmp:w 
 Some Text \cs_tmp:w 
 Some Text \cs_tmp:w 
+Some text \cs_tmp:w 
 \cs_tmp:w  sometext
 \cs_tmp:w  SOMETEXT
 \cs_tmp:w  Sometext
 \cs_tmp:w  Sometext
+\cs_tmp:w  sometext
 ============================================================
 ============================================================
 TEST 25: Math-mode escape
@@ -337,14 +357,17 @@ some text $y = mx + c$
 SOME TEXT $y = mx + c$
 Some Text $y = mx + c$
 Some Text $y = mx + c$
+Some text $y = mx + c$
 $y = mx + c$ text
 $y = mx + c$ TEXT
 $y = mx + c$ Text
 $y = mx + c$ Text
+$y = mx + c$ text
 opps not close token in $y = mx + c
 OPPS NOT CLOSE TOKEN IN $y = mx + c
 Opps Not Close Token In $y = mx + c
 Opps Not Close Token In $y = mx + c
+Opps not close token in $y = mx + c
 ============================================================
 ============================================================
 TEST 26: Nesting
@@ -361,6 +384,7 @@ TEST 27: Letter-like commands
 \AA \AA \AE \DH \SS \L \O 
 \AA \aa \ae \dh \ss \l \o 
 \AA \aa \ae \dh \ss \l \O 
+\AA \aa \ae \dh \ss \l \o 
 ============================================================
 ============================================================
 TEST 28: Accents
@@ -369,6 +393,7 @@ TEST 28: Accents
 \"{A}\u {E}\H {I}\v {O}\.{U}
 \"{A}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {e}\H {i}\v {o}\.{u}
+\"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
 TEST 29: Active chars
@@ -377,6 +402,7 @@ TEST 29: Active chars
 "`LO"=REM"'
 "`Lo"=rem"'
 "`Lo"=rem"'
+"`Lo"=rem"'
 ============================================================
 ============================================================
 TEST 30: Case changing exclusions
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index 3e6bf50c7..402875437 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -21,6 +21,8 @@
       \text_titlecase:n {#1}
       \NEWLINE
       \text_titlecase_first:n {#1}
+      \NEWLINE
+      \text_sentencecase:n {#1}
     }
   \cs_set:Npn \test:nn #1#2
     {
@@ -31,6 +33,8 @@
       \text_titlecase:nn {#1} {#2}
       \NEWLINE
       \text_titlecase_first:nn {#1} {#2}
+      \NEWLINE
+      \text_sentencecase:nn {#1} {#2}
     }
 \TIMO
 
diff --git a/l3kernel/testfiles/m3text002.ptex.tlg b/l3kernel/testfiles/m3text002.ptex.tlg
index c29045e59..8ab0f702b 100644
--- a/l3kernel/testfiles/m3text002.ptex.tlg
+++ b/l3kernel/testfiles/m3text002.ptex.tlg
@@ -8,6 +8,7 @@ hello world \par with \ERROR &##
 HELLO WORLD \par WITH \ERROR &##
 Hello World \par With \ERROR &##
 Hello World \par With \ERROR &##
+Hello world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 2: Case changes in braces
@@ -16,6 +17,7 @@ TEST 2: Case changes in braces
 {HELLO} WORLD \par WITH \ERROR &##
 {Hello} World \par With \ERROR &##
 {Hello} world \par with \ERROR &##
+{Hello} world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 3: Case change exclusions
@@ -24,6 +26,7 @@ some text \cite {WithFun}
 SOME TEXT \cite {WithFun}
 Some Text \cite {WithFun}
 Some Text \cite {WithFun}
+Some text \cite {WithFun}
 ============================================================
 ============================================================
 TEST 4: Titlecase basics
@@ -82,10 +85,12 @@ no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 ============================================================
 ============================================================
 TEST 9: (u)pTeX-based tests
@@ -94,6 +99,8 @@ abc^^c3^^a8日本語
 ABC^^c3^^88日本語
 Abc^^c3^^a8日本語
 ABC^^c3^^88日本語
+Abc^^c3^^a8日本語
+一^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 一^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 一^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 一^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
@@ -106,6 +113,7 @@ TEST 10: Unicode case changing
 ^^c3^^85^^c3^^89^^c3^^8e^^c3^^98^^e1^^bd^^adдα^^c6^^90
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5дα^^c9^^9b
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^adдα^^c6^^90
+^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5дα^^c9^^9b
 ============================================================
 ============================================================
 TEST 11: Unicode case changing exceptions
@@ -114,6 +122,7 @@ fu^^c3^^9fball
 FUSSBALL
 Fu^^c3^^9fball
 Fu^^c3^^9fball
+Fu^^c3^^9fball
 ============================================================
 ============================================================
 TEST 12: The final sigma rule
@@ -122,10 +131,12 @@ TEST 12: The final sigma rule
 ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ (^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ) ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ, ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ{} ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ\noop 
 ^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ (^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ) ^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ, ^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ{} ^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ\noop 
 ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ (^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ) ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ, ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ{} ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ\noop 
+^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ (^^e1^^bd^^80ΔΥΣΣΕ^^cf^^8dΣ) ^^e1^^bd^^80ΔΥΣΣΕ^^cf^^8dΣ, ^^e1^^bd^^80ΔΥΣΣΕ^^cf^^8dΣ{} ^^e1^^bd^^80ΔΥΣΣΕ^^cf^^8dΣ\noop 
 ^^e1^^bd^^80ΔΥΣΣΕ^^cf^^8dΣ
 ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ
 ^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ
 ^^e1^^bd^^88ΔΥΣΣΕ^^ce^^8eΣ
+^^e1^^bd^^88ΔΥΣΣΕ^^cf^^8dΣ
 ============================================================
 ============================================================
 TEST 13: Cyrillic
@@ -134,6 +145,7 @@ TEST 13: Cyrillic
 ^^ea^^9e^^a4окл^^ea^^9f^^90ды ^^ea^^9e^^a0к^^ea^^9f^^90демии н^^ea^^9f^^90ук
 ^^ea^^9e^^a4окл^^ea^^9f^^90ды ^^ea^^9e^^a0к^^ea^^9f^^90демии н^^ea^^9f^^90ук
 ^^ea^^9e^^a4окл^^ea^^9f^^90ды ^^ea^^9e^^a0к^^ea^^9f^^90демии н^^ea^^9f^^90ук
+^^ea^^9e^^a4окл^^ea^^9f^^90ды Акад^^ea^^9f^^97мии наук
 ============================================================
 ============================================================
 TEST 14: BCP47 parts
@@ -297,10 +309,12 @@ foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
 Foo \emph {BAR} {Baz}
 FOO \emph {BAR} {BAZ}
+Foo \emph {BAR} {baz}
 \emph {BAR} {baz}
 \emph {BAR} {BAZ}
 \emph {BAR} {Baz}
 \emph {BAR} {BAZ}
+\emph {BAR} {baz}
 ============================================================
 ============================================================
 TEST 24: Expanding content
@@ -309,26 +323,32 @@ some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text \cs_tmp:w 
 SOME TEXT \cs_tmp:w 
 Some Text \cs_tmp:w 
 Some Text \cs_tmp:w 
+Some text \cs_tmp:w 
 \cs_tmp:w  sometext
 \cs_tmp:w  SOMETEXT
 \cs_tmp:w  Sometext
 \cs_tmp:w  Sometext
+\cs_tmp:w  sometext
 ============================================================
 ============================================================
 TEST 25: Math-mode escape
@@ -337,14 +357,17 @@ some text $y = mx + c$
 SOME TEXT $y = mx + c$
 Some Text $y = mx + c$
 Some Text $y = mx + c$
+Some text $y = mx + c$
 $y = mx + c$ text
 $y = mx + c$ TEXT
 $y = mx + c$ Text
 $y = mx + c$ Text
+$y = mx + c$ text
 opps not close token in $y = mx + c
 OPPS NOT CLOSE TOKEN IN $y = mx + c
 Opps Not Close Token In $y = mx + c
 Opps Not Close Token In $y = mx + c
+Opps not close token in $y = mx + c
 ============================================================
 ============================================================
 TEST 26: Nesting
@@ -361,6 +384,7 @@ TEST 27: Letter-like commands
 \AA \AA \AE \DH \SS \L \O 
 \AA \aa \ae \dh \ss \l \o 
 \AA \aa \ae \dh \ss \l \O 
+\AA \aa \ae \dh \ss \l \o 
 ============================================================
 ============================================================
 TEST 28: Accents
@@ -369,6 +393,7 @@ TEST 28: Accents
 \"{A}\u {E}\H {I}\v {O}\.{U}
 \"{A}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {e}\H {i}\v {o}\.{u}
+\"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
 TEST 29: Active chars
@@ -377,6 +402,7 @@ TEST 29: Active chars
 "`LO"=REM"'
 "`Lo"=rem"'
 "`Lo"=rem"'
+"`Lo"=rem"'
 ============================================================
 ============================================================
 TEST 30: Case changing exclusions
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 13d56ed5b..1f20c3d5d 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -8,6 +8,7 @@ hello world \par with \ERROR &##
 HELLO WORLD \par WITH \ERROR &##
 Hello World \par With \ERROR &##
 Hello World \par With \ERROR &##
+Hello world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 2: Case changes in braces
@@ -16,6 +17,7 @@ TEST 2: Case changes in braces
 {HELLO} WORLD \par WITH \ERROR &##
 {Hello} World \par With \ERROR &##
 {Hello} world \par with \ERROR &##
+{Hello} world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 3: Case change exclusions
@@ -24,6 +26,7 @@ some text \cite {WithFun}
 SOME TEXT \cite {WithFun}
 Some Text \cite {WithFun}
 Some Text \cite {WithFun}
+Some text \cite {WithFun}
 ============================================================
 ============================================================
 TEST 4: Titlecase basics
@@ -82,10 +85,12 @@ no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 ============================================================
 ============================================================
 TEST 9: (u)pTeX-based tests
@@ -94,6 +99,8 @@ abc^^c3^^a8^^e6^^97^^a5^^e6^^9c^^ac^^e8^^aa^^9e
 ABC^^c3^^88^^e6^^97^^a5^^e6^^9c^^ac^^e8^^aa^^9e
 Abc^^c3^^a8^^e6^^97^^a5^^e6^^9c^^ac^^e8^^aa^^9e
 ABC^^c3^^88^^e6^^97^^a5^^e6^^9c^^ac^^e8^^aa^^9e
+Abc^^c3^^a8^^e6^^97^^a5^^e6^^9c^^ac^^e8^^aa^^9e
+^^e4^^b8^^80^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 ^^e4^^b8^^80^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 ^^e4^^b8^^80^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
 ^^e4^^b8^^80^^e7^^ba^^a7^^e6^^a0^^87^^e9^^a2^^98
@@ -106,6 +113,7 @@ TEST 10: Unicode case changing
 ^^c3^^85^^c3^^89^^c3^^8e^^c3^^98^^e1^^bd^^ad^^d0^^94^^ce^^91^^c6^^90
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5^^d0^^b4^^ce^^b1^^c9^^9b
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^ad^^d0^^b4^^ce^^b1^^c6^^90
+^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5^^d0^^b4^^ce^^b1^^c9^^9b
 ============================================================
 ============================================================
 TEST 11: Unicode case changing exceptions
@@ -114,6 +122,7 @@ fu^^c3^^9fball
 FUSSBALL
 Fu^^c3^^9fball
 Fu^^c3^^9fball
+Fu^^c3^^9fball
 ============================================================
 ============================================================
 TEST 12: The final sigma rule
@@ -122,10 +131,12 @@ TEST 12: The final sigma rule
 ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3 (^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3) ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3, ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3{} ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3\noop 
 ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82 (^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82) ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82, ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82{} ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82\noop 
 ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3 (^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3) ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3, ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3{} ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3\noop 
+^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82 (^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82) ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82, ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82{} ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82\noop 
 ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3
 ^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ^^e1^^bd^^88^^ce^^94^^ce^^a5^^ce^^a3^^ce^^a3^^ce^^95^^ce^^8e^^ce^^a3
+^^e1^^bd^^88^^ce^^b4^^cf^^85^^cf^^83^^cf^^83^^ce^^b5^^cf^^8d^^cf^^82
 ============================================================
 ============================================================
 TEST 13: Cyrillic
@@ -134,6 +145,7 @@ TEST 13: Cyrillic
 ^^d0^^94^^d0^^9e^^d0^^9a^^d0^^9b^^d0^^90^^d0^^94^^d0^^ab ^^d0^^90^^d0^^9a^^d0^^90^^d0^^94^^d0^^95^^d0^^9c^^d0^^98^^d0^^98 ^^d0^^9d^^d0^^90^^d0^^a3^^d0^^9a
 ^^d0^^94^^d0^^be^^d0^^ba^^d0^^bb^^d0^^b0^^d0^^b4^^d1^^8b ^^d0^^90^^d0^^ba^^d0^^b0^^d0^^b4^^d0^^b5^^d0^^bc^^d0^^b8^^d0^^b8 ^^d0^^9d^^d0^^b0^^d1^^83^^d0^^ba
 ^^d0^^94^^d0^^be^^d0^^ba^^d0^^bb^^d0^^b0^^d0^^b4^^d1^^8b ^^d0^^90^^d0^^ba^^d0^^b0^^d0^^b4^^d0^^b5^^d0^^bc^^d0^^b8^^d0^^b8 ^^d0^^9d^^d0^^b0^^d1^^83^^d0^^ba
+^^d0^^94^^d0^^be^^d0^^ba^^d0^^bb^^d0^^b0^^d0^^b4^^d1^^8b ^^d0^^b0^^d0^^ba^^d0^^b0^^d0^^b4^^d0^^b5^^d0^^bc^^d0^^b8^^d0^^b8 ^^d0^^bd^^d0^^b0^^d1^^83^^d0^^ba
 ============================================================
 ============================================================
 TEST 14: BCP47 parts
@@ -297,10 +309,12 @@ foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
 Foo \emph {BAR} {Baz}
 FOO \emph {BAR} {BAZ}
+Foo \emph {BAR} {baz}
 \emph {BAR} {baz}
 \emph {BAR} {BAZ}
 \emph {BAR} {Baz}
 \emph {BAR} {BAZ}
+\emph {BAR} {baz}
 ============================================================
 ============================================================
 TEST 24: Expanding content
@@ -309,26 +323,32 @@ some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text \cs_tmp:w 
 SOME TEXT \cs_tmp:w 
 Some Text \cs_tmp:w 
 Some Text \cs_tmp:w 
+Some text \cs_tmp:w 
 \cs_tmp:w  sometext
 \cs_tmp:w  SOMETEXT
 \cs_tmp:w  Sometext
 \cs_tmp:w  Sometext
+\cs_tmp:w  sometext
 ============================================================
 ============================================================
 TEST 25: Math-mode escape
@@ -337,14 +357,17 @@ some text $y = mx + c$
 SOME TEXT $y = mx + c$
 Some Text $y = mx + c$
 Some Text $y = mx + c$
+Some text $y = mx + c$
 $y = mx + c$ text
 $y = mx + c$ TEXT
 $y = mx + c$ Text
 $y = mx + c$ Text
+$y = mx + c$ text
 opps not close token in $y = mx + c
 OPPS NOT CLOSE TOKEN IN $y = mx + c
 Opps Not Close Token In $y = mx + c
 Opps Not Close Token In $y = mx + c
+Opps not close token in $y = mx + c
 ============================================================
 ============================================================
 TEST 26: Nesting
@@ -361,6 +384,7 @@ TEST 27: Letter-like commands
 \AA \AA \AE \DH \SS \L \O 
 \AA \aa \ae \dh \ss \l \o 
 \AA \aa \ae \dh \ss \l \O 
+\AA \aa \ae \dh \ss \l \o 
 ============================================================
 ============================================================
 TEST 28: Accents
@@ -369,6 +393,7 @@ TEST 28: Accents
 \"{A}\u {E}\H {I}\v {O}\.{U}
 \"{A}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {e}\H {i}\v {o}\.{u}
+\"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
 TEST 29: Active chars
@@ -377,6 +402,7 @@ TEST 29: Active chars
 "`LO"=REM"'
 "`Lo"=rem"'
 "`Lo"=rem"'
+"`Lo"=rem"'
 ============================================================
 ============================================================
 TEST 30: Case changing exclusions
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index 04cf4df04..b24cd669c 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -8,6 +8,7 @@ hello world \par with \ERROR &##
 HELLO WORLD \par WITH \ERROR &##
 Hello World \par With \ERROR &##
 Hello World \par With \ERROR &##
+Hello world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 2: Case changes in braces
@@ -16,6 +17,7 @@ TEST 2: Case changes in braces
 {HELLO} WORLD \par WITH \ERROR &##
 {Hello} World \par With \ERROR &##
 {Hello} world \par with \ERROR &##
+{Hello} world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 3: Case change exclusions
@@ -24,6 +26,7 @@ some text \cite {WithFun}
 SOME TEXT \cite {WithFun}
 Some Text \cite {WithFun}
 Some Text \cite {WithFun}
+Some text \cite {WithFun}
 ============================================================
 ============================================================
 TEST 4: Titlecase basics
@@ -82,10 +85,12 @@ no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 ============================================================
 ============================================================
 TEST 9: (u)pTeX-based tests
@@ -94,6 +99,8 @@ abc^^c3^^a8日本語
 ABC^^c3^^88日本語
 Abc^^c3^^a8日本語
 ABC^^c3^^88日本語
+Abc^^c3^^a8日本語
+一级标题
 一级标题
 一级标题
 一级标题
@@ -106,6 +113,7 @@ TEST 10: Unicode case changing
 ^^c3^^85^^c3^^89^^c3^^8e^^c3^^98Ὥ^^d0^^94^^ce^^91^^c6^^90
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5дα^^c9^^9b
 ^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8Ὥдα^^c6^^90
+^^c3^^85^^c3^^a9^^c3^^ae^^c3^^b8^^e1^^bd^^a5дα^^c9^^9b
 ============================================================
 ============================================================
 TEST 11: Unicode case changing exceptions
@@ -114,6 +122,7 @@ fu^^c3^^9fball
 FUSSBALL
 Fu^^c3^^9fball
 Fu^^c3^^9fball
+Fu^^c3^^9fball
 ============================================================
 ============================================================
 TEST 12: The final sigma rule
@@ -122,10 +131,12 @@ TEST 12: The final sigma rule
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
+ὈΔΥΣΣΕΎΣ (^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^82^^cf^^82^^ce^^b5^^cf^^8d^^cf^^82) ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^82^^cf^^82^^ce^^b5^^cf^^8d^^cf^^82, ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^82^^cf^^82^^ce^^b5^^cf^^8d^^cf^^82{} ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^82^^cf^^82^^ce^^b5^^cf^^8d^^cf^^82\noop 
 ^^e1^^bd^^80^^ce^^b4^^cf^^85^^cf^^82^^cf^^82^^ce^^b5^^cf^^8d^^cf^^82
 ὈΔΥΣΣΕΎΣ
 ὈΔΥΣΣΕΎΣ
 ὈΔΥΣΣΕΎΣ
+ὈΔΥΣΣΕΎΣ
 ============================================================
 ============================================================
 TEST 13: Cyrillic
@@ -134,6 +145,7 @@ TEST 13: Cyrillic
 Д^^d0^^9e^^d0^^9a^^d0^^9b^^d0^^90^^d0^^94^^d0^^ab А^^d0^^9a^^d0^^90^^d0^^94^^d0^^95^^d0^^9c^^d0^^98^^d0^^98 ^^d0^^9d^^d0^^90^^d0^^a3^^d0^^9a
 Д^^d0^^9e^^d0^^9a^^d0^^9b^^d0^^90^^d0^^94^^d0^^ab А^^d0^^9a^^d0^^90^^d0^^94^^d0^^95^^d0^^9c^^d0^^98^^d0^^98 ^^d0^^9d^^d0^^90^^d0^^a3^^d0^^9a
 Д^^d0^^9e^^d0^^9a^^d0^^9b^^d0^^90^^d0^^94^^d0^^ab А^^d0^^9a^^d0^^90^^d0^^94^^d0^^95^^d0^^9c^^d0^^98^^d0^^98 ^^d0^^9d^^d0^^90^^d0^^a3^^d0^^9a
+Д^^d0^^9e^^d0^^9a^^d0^^9b^^d0^^90^^d0^^94^^d0^^ab ^^d0^^b0кадемии наук
 ============================================================
 ============================================================
 TEST 14: BCP47 parts
@@ -297,10 +309,12 @@ foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
 Foo \emph {BAR} {Baz}
 FOO \emph {BAR} {BAZ}
+Foo \emph {BAR} {baz}
 \emph {BAR} {baz}
 \emph {BAR} {BAZ}
 \emph {BAR} {Baz}
 \emph {BAR} {BAZ}
+\emph {BAR} {baz}
 ============================================================
 ============================================================
 TEST 24: Expanding content
@@ -309,26 +323,32 @@ some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text \cs_tmp:w 
 SOME TEXT \cs_tmp:w 
 Some Text \cs_tmp:w 
 Some Text \cs_tmp:w 
+Some text \cs_tmp:w 
 \cs_tmp:w  sometext
 \cs_tmp:w  SOMETEXT
 \cs_tmp:w  Sometext
 \cs_tmp:w  Sometext
+\cs_tmp:w  sometext
 ============================================================
 ============================================================
 TEST 25: Math-mode escape
@@ -337,14 +357,17 @@ some text $y = mx + c$
 SOME TEXT $y = mx + c$
 Some Text $y = mx + c$
 Some Text $y = mx + c$
+Some text $y = mx + c$
 $y = mx + c$ text
 $y = mx + c$ TEXT
 $y = mx + c$ Text
 $y = mx + c$ Text
+$y = mx + c$ text
 opps not close token in $y = mx + c
 OPPS NOT CLOSE TOKEN IN $y = mx + c
 Opps Not Close Token In $y = mx + c
 Opps Not Close Token In $y = mx + c
+Opps not close token in $y = mx + c
 ============================================================
 ============================================================
 TEST 26: Nesting
@@ -361,6 +384,7 @@ TEST 27: Letter-like commands
 \AA \AA \AE \DH \SS \L \O 
 \AA \aa \ae \dh \ss \l \o 
 \AA \aa \ae \dh \ss \l \O 
+\AA \aa \ae \dh \ss \l \o 
 ============================================================
 ============================================================
 TEST 28: Accents
@@ -369,6 +393,7 @@ TEST 28: Accents
 \"{A}\u {E}\H {I}\v {O}\.{U}
 \"{A}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {e}\H {i}\v {o}\.{u}
+\"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
 TEST 29: Active chars
@@ -377,6 +402,7 @@ TEST 29: Active chars
 "`LO"=REM"'
 "`Lo"=rem"'
 "`Lo"=rem"'
+"`Lo"=rem"'
 ============================================================
 ============================================================
 TEST 30: Case changing exclusions
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index 8f9586c10..8bcc8b0ac 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -8,6 +8,7 @@ hello world \par with \ERROR &##
 HELLO WORLD \par WITH \ERROR &##
 Hello World \par With \ERROR &##
 Hello World \par With \ERROR &##
+Hello world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 2: Case changes in braces
@@ -16,6 +17,7 @@ TEST 2: Case changes in braces
 {HELLO} WORLD \par WITH \ERROR &##
 {Hello} World \par With \ERROR &##
 {Hello} world \par with \ERROR &##
+{Hello} world \par with \ERROR &##
 ============================================================
 ============================================================
 TEST 3: Case change exclusions
@@ -24,6 +26,7 @@ some text \cite {WithFun}
 SOME TEXT \cite {WithFun}
 Some Text \cite {WithFun}
 Some Text \cite {WithFun}
+Some text \cite {WithFun}
 ============================================================
 ============================================================
 TEST 4: Titlecase basics
@@ -82,10 +85,12 @@ no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 no problems
 NO PROBLEMS
 No Problems
 No Problems
+No problems
 ============================================================
 ============================================================
 TEST 9: (u)pTeX-based tests
@@ -94,6 +99,8 @@ abc^^e8日本語
 ABC^^c8日本語
 Abc^^e8日本語
 ABC^^c8日本語
+Abc^^e8日本語
+一级标题
 一级标题
 一级标题
 一级标题
@@ -106,6 +113,7 @@ TEST 10: Unicode case changing
 ^^c5^^c9^^ce^^d8ὭДΑƐ
 ^^c5^^e9^^ee^^f8ὥдαɛ
 ^^c5^^e9^^ee^^f8ὭдαƐ
+^^c5^^e9^^ee^^f8ὥдαɛ
 ============================================================
 ============================================================
 TEST 11: Unicode case changing exceptions
@@ -114,6 +122,7 @@ fu^^dfball
 FUSSBALL
 Fu^^dfball
 Fu^^dfball
+Fu^^dfball
 ============================================================
 ============================================================
 TEST 12: The final sigma rule
@@ -122,10 +131,12 @@ TEST 12: The final sigma rule
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
 Ὀδυσσεύς (Ὀδυσσεύς) Ὀδυσσεύς, Ὀδυσσεύς{} Ὀδυσσεύς\noop 
 ὈΔΥΣΣΕΎΣ (ὈΔΥΣΣΕΎΣ) ὈΔΥΣΣΕΎΣ, ὈΔΥΣΣΕΎΣ{} ὈΔΥΣΣΕΎΣ\noop 
+Ὀδυσσεύς (ὀδυσσεύς) ὀδυσσεύς, ὀδυσσεύς{} ὀδυσσεύς\noop 
 ὀδυσσεύς
 ὈΔΥΣΣΕΎΣ
 Ὀδυσσεύς
 ὈΔΥΣΣΕΎΣ
+Ὀδυσσεύς
 ============================================================
 ============================================================
 TEST 13: Cyrillic
@@ -134,6 +145,7 @@ TEST 13: Cyrillic
 ДОКЛАДЫ АКАДЕМИИ НАУК
 Доклады Академии Наук
 Доклады Академии Наук
+Доклады академии наук
 ============================================================
 ============================================================
 TEST 14: BCP47 parts
@@ -297,10 +309,12 @@ foo \emph {BAR} {baz}
 FOO \emph {BAR} {BAZ}
 Foo \emph {BAR} {Baz}
 FOO \emph {BAR} {BAZ}
+Foo \emph {BAR} {baz}
 \emph {BAR} {baz}
 \emph {BAR} {BAZ}
 \emph {BAR} {Baz}
 \emph {BAR} {BAZ}
+\emph {BAR} {baz}
 ============================================================
 ============================================================
 TEST 24: Expanding content
@@ -309,26 +323,32 @@ some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text hello
 SOME TEXT HELLO
 Some Text Hello
 Some Text Hello
+Some text hello
 hello sometext
 HELLO SOMETEXT
 Hello Sometext
 Hello Sometext
+Hello sometext
 some text \cs_tmp:w 
 SOME TEXT \cs_tmp:w 
 Some Text \cs_tmp:w 
 Some Text \cs_tmp:w 
+Some text \cs_tmp:w 
 \cs_tmp:w  sometext
 \cs_tmp:w  SOMETEXT
 \cs_tmp:w  Sometext
 \cs_tmp:w  Sometext
+\cs_tmp:w  sometext
 ============================================================
 ============================================================
 TEST 25: Math-mode escape
@@ -337,14 +357,17 @@ some text $y = mx + c$
 SOME TEXT $y = mx + c$
 Some Text $y = mx + c$
 Some Text $y = mx + c$
+Some text $y = mx + c$
 $y = mx + c$ text
 $y = mx + c$ TEXT
 $y = mx + c$ Text
 $y = mx + c$ Text
+$y = mx + c$ text
 opps not close token in $y = mx + c
 OPPS NOT CLOSE TOKEN IN $y = mx + c
 Opps Not Close Token In $y = mx + c
 Opps Not Close Token In $y = mx + c
+Opps not close token in $y = mx + c
 ============================================================
 ============================================================
 TEST 26: Nesting
@@ -361,6 +384,7 @@ TEST 27: Letter-like commands
 \AA \AA \AE \DH \SS \L \O 
 \AA \aa \ae \dh \ss \l \o 
 \AA \aa \ae \dh \ss \l \O 
+\AA \aa \ae \dh \ss \l \o 
 ============================================================
 ============================================================
 TEST 28: Accents
@@ -369,6 +393,7 @@ TEST 28: Accents
 \"{A}\u {E}\H {I}\v {O}\.{U}
 \"{A}\u {e}\H {i}\v {o}\.{u}
 \"{A}\u {e}\H {i}\v {o}\.{u}
+\"{A}\u {e}\H {i}\v {o}\.{u}
 ============================================================
 ============================================================
 TEST 29: Active chars
@@ -377,6 +402,7 @@ TEST 29: Active chars
 "`LO"=REM"'
 "`Lo"=rem"'
 "`Lo"=rem"'
+"`Lo"=rem"'
 ============================================================
 ============================================================
 TEST 30: Case changing exclusions





More information about the latex3-commits mailing list.