[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Add test to check if the commands are properly restored (fb9da2e1)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Mar 19 03:24:01 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/fb9da2e1ae34361270248e2c69a459da27f4cbf5

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

commit fb9da2e1ae34361270248e2c69a459da27f4cbf5
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Mar 18 23:24:01 2021 -0300

    Add test to check if the commands are properly restored


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

fb9da2e1ae34361270248e2c69a459da27f4cbf5
 base/testfiles/github-0479.luatex.tlg | 26 +++++++++++++++++++++++++-
 base/testfiles/github-0479.lvt        | 11 ++++++++---
 base/testfiles/github-0479.tlg        | 20 +++++++++++++++++++-
 base/testfiles/github-0479.xetex.tlg  | 20 +++++++++++++++++++-
 4 files changed, 71 insertions(+), 6 deletions(-)

diff --git a/base/testfiles/github-0479.luatex.tlg b/base/testfiles/github-0479.luatex.tlg
index a366aded..d3ef21e4 100644
--- a/base/testfiles/github-0479.luatex.tlg
+++ b/base/testfiles/github-0479.luatex.tlg
@@ -904,4 +904,28 @@ Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
-[1] (github-0479.aux)
+> \__kernel_chk_if_free_cs:N=\protected\long macro:
+#1->\cs_if_free:NF #1{\__kernel_msg_error:nnxx {kernel}{command-already-defined
+}{\token_to_str:N #1}{\token_to_meaning:N #1}}.
+l. ...\show \__kernel_chk_if_free_cs:N
+> \e at alloc=macro:
+#1#2#3#4#5#6->\global \advance #3\@ne \e at ch@ck {#3}{#4}{#5}#1\allocationnumber 
+#3\relax \global #2#6\allocationnumber \wlog {\string #6=\string #1\the \alloca
+tionnumber }.
+l. ...\show \e at alloc
+> \__kernel_msg_error:nnx=\protected\long macro:
+#1#2#3->\__kernel_msg_error:nnxxxx {#1}{#2}{#3}{}{}{}.
+l. ...\show \__kernel_msg_error:nnx
+> \msg_new:nnnn=\protected\long macro:
+#1#2->\__msg_chk_free:nn {#1}{#2}\msg_gset:nnnn {#1}{#2}.
+l. ...\show \msg_new:nnnn
+> \NewDocumentCommand=\protected\long macro:
+#1#2#3->\__cmd_check_definable:nNT {#1}\NewDocumentCommand {\cs_if_exist:NTF #1
+{\__kernel_msg_error:nnxx {ltcmd}{command-already-defined}{\use:nnn \token_to_s
+tr:N #1{}}{\token_to_str:N \NewDocumentCommand }}{\__cmd_declare_cmd:Nnn #1{#2}
+{#3}}}.
+l. ...\show \NewDocumentCommand
+> \newcommand=macro:
+->\@star at or@long \new at command .
+l. ...\show \newcommand
+(github-0479.aux)
diff --git a/base/testfiles/github-0479.lvt b/base/testfiles/github-0479.lvt
index 9039b412..04528aaf 100644
--- a/base/testfiles/github-0479.lvt
+++ b/base/testfiles/github-0479.lvt
@@ -4,9 +4,16 @@
 
 \START
 
-
 \RequirePackage[2020/10/01]{latexrelease}
 
+\makeatletter\ExplSyntaxOn
+\show \__kernel_chk_if_free_cs:N
+\show \e at alloc
+\show \__kernel_msg_error:nnx
+\show \msg_new:nnnn
+\show \NewDocumentCommand
+\show \newcommand
+\makeatother\ExplSyntaxOff
 
 \OMIT
 
@@ -16,7 +23,5 @@
 
 \TIMO
 
-test
-
 \end{document}
 
diff --git a/base/testfiles/github-0479.tlg b/base/testfiles/github-0479.tlg
index 1e581601..578ac2cf 100644
--- a/base/testfiles/github-0479.tlg
+++ b/base/testfiles/github-0479.tlg
@@ -1308,4 +1308,22 @@ Now handling font encoding U ...
 )
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
-[1] (github-0479.aux)
+> \__kernel_chk_if_free_cs:N=\protected\long macro:
+#1->\cs_if_free:NF #1{\__kernel_msg_error:nnxx {kernel}{command-already-defined}{\token_to_str:N #1}{\token_to_meaning:N #1}}.
+l. ...\show \__kernel_chk_if_free_cs:N
+> \e at alloc=macro:
+#1#2#3#4#5#6->\global \advance #3\@ne \e at ch@ck {#3}{#4}{#5}#1\allocationnumber #3\relax \global #2#6\allocationnumber \wlog {\string #6=\string #1\the \allocationnumber }.
+l. ...\show \e at alloc
+> \__kernel_msg_error:nnx=\protected\long macro:
+#1#2#3->\__kernel_msg_error:nnxxxx {#1}{#2}{#3}{}{}{}.
+l. ...\show \__kernel_msg_error:nnx
+> \msg_new:nnnn=\protected\long macro:
+#1#2->\__msg_chk_free:nn {#1}{#2}\msg_gset:nnnn {#1}{#2}.
+l. ...\show \msg_new:nnnn
+> \NewDocumentCommand=\protected\long macro:
+#1#2#3->\__cmd_check_definable:nNT {#1}\NewDocumentCommand {\cs_if_exist:NTF #1{\__kernel_msg_error:nnxx {ltcmd}{command-already-defined}{\use:nnn \token_to_str:N #1{}}{\token_to_str:N \NewDocumentCommand }}{\__cmd_declare_cmd:Nnn #1{#2}{#3}}}.
+l. ...\show \NewDocumentCommand
+> \newcommand=macro:
+->\@star at or@long \new at command .
+l. ...\show \newcommand
+(github-0479.aux)
diff --git a/base/testfiles/github-0479.xetex.tlg b/base/testfiles/github-0479.xetex.tlg
index fb0098af..0c6c6aa6 100644
--- a/base/testfiles/github-0479.xetex.tlg
+++ b/base/testfiles/github-0479.xetex.tlg
@@ -901,4 +901,22 @@ Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
-[1] (github-0479.aux)
+> \__kernel_chk_if_free_cs:N=\protected\long macro:
+#1->\cs_if_free:NF #1{\__kernel_msg_error:nnxx {kernel}{command-already-defined}{\token_to_str:N #1}{\token_to_meaning:N #1}}.
+l. ...\show \__kernel_chk_if_free_cs:N
+> \e at alloc=macro:
+#1#2#3#4#5#6->\global \advance #3\@ne \e at ch@ck {#3}{#4}{#5}#1\allocationnumber #3\relax \global #2#6\allocationnumber \wlog {\string #6=\string #1\the \allocationnumber }.
+l. ...\show \e at alloc
+> \__kernel_msg_error:nnx=\protected\long macro:
+#1#2#3->\__kernel_msg_error:nnxxxx {#1}{#2}{#3}{}{}{}.
+l. ...\show \__kernel_msg_error:nnx
+> \msg_new:nnnn=\protected\long macro:
+#1#2->\__msg_chk_free:nn {#1}{#2}\msg_gset:nnnn {#1}{#2}.
+l. ...\show \msg_new:nnnn
+> \NewDocumentCommand=\protected\long macro:
+#1#2#3->\__cmd_check_definable:nNT {#1}\NewDocumentCommand {\cs_if_exist:NTF #1{\__kernel_msg_error:nnxx {ltcmd}{command-already-defined}{\use:nnn \token_to_str:N #1{}}{\token_to_str:N \NewDocumentCommand }}{\__cmd_declare_cmd:Nnn #1{#2}{#3}}}.
+l. ...\show \NewDocumentCommand
+> \newcommand=macro:
+->\@star at or@long \new at command .
+l. ...\show \newcommand
+(github-0479.aux)





More information about the latex3-commits mailing list.