[latex3-commits] [git/LaTeX3-latex3-latex3] main: Add test for \DeclareTemplateCopy (37ba89e0e)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Feb 1 07:35:59 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/37ba89e0e5e2fdfbebe77deb94c8f18552f1ee44

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

commit 37ba89e0e5e2fdfbebe77deb94c8f18552f1ee44
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Feb 1 06:35:59 2023 +0000

    Add test for \DeclareTemplateCopy


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

37ba89e0e5e2fdfbebe77deb94c8f18552f1ee44
 l3packages/xtemplate/testfiles/xtemplate006.lvt | 10 ++++++++--
 l3packages/xtemplate/testfiles/xtemplate006.tlg | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/l3packages/xtemplate/testfiles/xtemplate006.lvt b/l3packages/xtemplate/testfiles/xtemplate006.lvt
index 2a6627a09..de31e9103 100644
--- a/l3packages/xtemplate/testfiles/xtemplate006.lvt
+++ b/l3packages/xtemplate/testfiles/xtemplate006.lvt
@@ -1,5 +1,5 @@
 %
-% Copyright (C) 2022 LaTeX Project
+% Copyright (C) 2022,2023 LaTeX Project
 %
 
 \documentclass{minimal}
@@ -34,7 +34,8 @@
       \tl_show:N \g_y_tl
     }
   \DeclareRestrictedTemplate { word } { ONE } { TWO } { x = A }
-  \DeclareInstance { word } { one } { ONE } { y = Y}
+  \DeclareInstance { word } { one } { ONE } { y = Y }
+  \DeclareInstanceCopy { word } { one } { three }
 \TIMO
 \ExplSyntaxOff
 
@@ -49,4 +50,9 @@
 \EditInstance{word}{two}{y=C}
 \UseInstance{word}{two}\Rightarrow {??}
 
+\UseInstance{word}{three}\Rightarrow {??}
+\EditInstance{word}{three}{y=A}
+\UseInstance{word}{three}\Rightarrow {??}
+\UseInstance{word}{one}\Rightarrow {??}
+
 \END
diff --git a/l3packages/xtemplate/testfiles/xtemplate006.tlg b/l3packages/xtemplate/testfiles/xtemplate006.tlg
index c058ed1b8..421bf10f5 100644
--- a/l3packages/xtemplate/testfiles/xtemplate006.tlg
+++ b/l3packages/xtemplate/testfiles/xtemplate006.tlg
@@ -26,3 +26,21 @@ l. ...\UseInstance{word}{two}\Rightarrow {??}
 > \g_y_tl=C.
 <recently read> }
 l. ...\UseInstance{word}{two}\Rightarrow {??}
+> \g_x_tl=X.
+<recently read> }
+l. ...\UseInstance{word}{three}\Rightarrow {??}
+> \g_y_tl=Y.
+<recently read> }
+l. ...\UseInstance{word}{three}\Rightarrow {??}
+> \g_x_tl=X.
+<recently read> }
+l. ...\UseInstance{word}{three}\Rightarrow {??}
+> \g_y_tl=A.
+<recently read> }
+l. ...\UseInstance{word}{three}\Rightarrow {??}
+> \g_x_tl=X.
+<recently read> }
+l. ...\UseInstance{word}{one}\Rightarrow {??}
+> \g_y_tl=Z.
+<recently read> }
+l. ...\UseInstance{word}{one}\Rightarrow {??}





More information about the latex3-commits mailing list.