diff --git a/base/testfiles-ltcmd/ltcmd000.lvt b/base/testfiles-ltcmd/ltcmd000.lvt index df09532b7..0af23aa02 100644 --- a/base/testfiles-ltcmd/ltcmd000.lvt +++ b/base/testfiles-ltcmd/ltcmd000.lvt @@ -11,5 +11,5 @@ \START \AUTHOR{Bruno Le Floch} -\RequirePackage{xparse} +% \RequirePackage{xparse} \END diff --git a/base/testfiles-ltcmd/ltcmd000.tlg b/base/testfiles-ltcmd/ltcmd000.tlg index 20e9360ee..de13c726a 100644 --- a/base/testfiles-ltcmd/ltcmd000.tlg +++ b/base/testfiles-ltcmd/ltcmd000.tlg @@ -1,6 +1,3 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. Author: Bruno Le Floch -(xparse.sty -Package: xparse ....-..-.. L3 Experimental document command parser -(xparse-generic.tex)) diff --git a/base/testfiles-ltcmd/ltcmd001.lvt b/base/testfiles-ltcmd/ltcmd001.lvt index 0c8350548..b39775024 100644 --- a/base/testfiles-ltcmd/ltcmd001.lvt +++ b/base/testfiles-ltcmd/ltcmd001.lvt @@ -9,7 +9,7 @@ \ExplSyntaxOn \debug_on:n { check-declarations , deprecation , log-functions } \ExplSyntaxOff -\RequirePackage{xparse} +% \RequirePackage{xparse} \begin{document} \START @@ -128,41 +128,43 @@ \xparse_show:N \foo } -\TEST{Arguments~read~up~to~first~brace}{ - \OMIT - \DeclareDocumentCommand \foo { l m } { - \tl_set:Nn \l_test_tl { (#1) (#2) } - \tl_show:N \l_test_tl - } - \TIMO - \foo \bar {1} - \foo 100 {2} - \OMIT - \DeclareDocumentCommand \foo { +l m } { - \tl_set:Nn \l_test_tl { (#1) (#2) } - \tl_show:N \l_test_tl - } - \TIMO - \foo \bar - - {1} - \foo 100 - - {2} -} - -\TEST{Various~mandatory~combinations}{ - \DeclareDocumentCommand \foo { l m } { (#1) (#2) } - \xparse_show:N \foo - \DeclareDocumentCommand \foo { m l m } { (#1) (#2) (#3) } - \xparse_show:N \foo - \DeclareDocumentCommand \foo { u{end} u{stop!} } { (#1) (#2) } - \xparse_show:N \foo - \DeclareDocumentCommand \foo { l l l } { (#1) (#2) (#3) } - \xparse_show:N \foo - \DeclareDocumentCommand \foo { +l >{\foo}u{end} } { (#1) (#2) } - \xparse_show:N \foo -} +% Disabled: test requires deprecated xparse.sty +% \TEST{Arguments~read~up~to~first~brace}{ +% \OMIT +% \DeclareDocumentCommand \foo { l m } { +% \tl_set:Nn \l_test_tl { (#1) (#2) } +% \tl_show:N \l_test_tl +% } +% \TIMO +% \foo \bar {1} +% \foo 100 {2} +% \OMIT +% \DeclareDocumentCommand \foo { +l m } { +% \tl_set:Nn \l_test_tl { (#1) (#2) } +% \tl_show:N \l_test_tl +% } +% \TIMO +% \foo \bar +% +% {1} +% \foo 100 +% +% {2} +% } + +% Disabled: test requires deprecated xparse.sty +% \TEST{Various~mandatory~combinations}{ +% \DeclareDocumentCommand \foo { l m } { (#1) (#2) } +% \xparse_show:N \foo +% \DeclareDocumentCommand \foo { m l m } { (#1) (#2) (#3) } +% \xparse_show:N \foo +% \DeclareDocumentCommand \foo { u{end} u{stop!} } { (#1) (#2) } +% \xparse_show:N \foo +% \DeclareDocumentCommand \foo { l l l } { (#1) (#2) (#3) } +% \xparse_show:N \foo +% \DeclareDocumentCommand \foo { +l >{\foo}u{end} } { (#1) (#2) } +% \xparse_show:N \foo +% } \TEST{Optional~argument~creation}{ \DeclareDocumentCommand \foo { s o m } { (#1) (#2) (#3) } @@ -174,10 +176,11 @@ \xparse_show:N \foo \DeclareDocumentCommand \foo { m o m o } { (#1) (#2) (#3) (#4) } \xparse_show:N \foo - \DeclareDocumentCommand \foo { m g o m } { (#1) (#2) (#3) (#4) } - \xparse_show:N \foo - \DeclareDocumentCommand \foo { m G{test} s m } { (#1) (#2) (#3) (#4) } - \xparse_show:N \foo + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentCommand \foo { m g o m } { (#1) (#2) (#3) (#4) } + % \xparse_show:N \foo + % \DeclareDocumentCommand \foo { m G{test} s m } { (#1) (#2) (#3) (#4) } + % \xparse_show:N \foo } \TEST{Unknown~argument~types}{ @@ -245,9 +248,10 @@ \DeclareDocumentEnvironment { foo } { s o +m } { (#1) (#2) (#3) } { (#1) (#2) (#3) } \xparse_show_env:n { foo } - \DeclareDocumentEnvironment { foo } { u{stop} o m } - { (#1) (#2) (#3) } { (#1) (#2) (#3) } - \xparse_show_env:n { foo } + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentEnvironment { foo } { u{stop} o m } + % { (#1) (#2) (#3) } { (#1) (#2) (#3) } + % \xparse_show_env:n { foo } \DeclareDocumentEnvironment { foo } { m o o } { (#1) (#2) (#3) } { (#1) (#2) (#3) } \xparse_show_env:n { foo } @@ -360,10 +364,11 @@ { \DeclareDocumentCommand { \foo } { m m } { #1-#2 } \TYPE { \exp_not:c { test- \foo { abc } { def } } } - \DeclareDocumentCommand { \foo } { u. } { test-#1 } - \TYPE { \exp_not:c { test- \foo abc . } } - \DeclareDocumentCommand { \foo } { l } { #1 . } - \TYPE { \exp_not:c { test- \foo abc { def } } } + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentCommand { \foo } { u. } { test-#1 } + % \TYPE { \exp_not:c { test- \foo abc . } } + % \DeclareDocumentCommand { \foo } { l } { #1 . } + % \TYPE { \exp_not:c { test- \foo abc { def } } } \DeclareDocumentCommand { \foo } { D... } { test-#1 } \TYPE { \exp_not:c { test- \foo .... } } \cs_set:cpn { conditionally@traceoff } { \relax } % some int assignment diff --git a/base/testfiles-ltcmd/ltcmd001.tlg b/base/testfiles-ltcmd/ltcmd001.tlg index 669572e3d..7a064d011 100644 --- a/base/testfiles-ltcmd/ltcmd001.tlg +++ b/base/testfiles-ltcmd/ltcmd001.tlg @@ -17,7 +17,7 @@ For immediate help type H . l. ...} You have used \RenewDocumentCommand with a command that was never defined. LaTeX will ignore this entire definition. -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {}\foo \foo \foo +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {}\foo \foo \foo code ?{}. } l. ...} @@ -28,82 +28,82 @@ l. ...} ============================================================ TEST 2: Commands with simple mandatory arguments ============================================================ -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {m}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {m}\foo \foo \foo +code ?{\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1->(#1). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mm}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mm}\foo \foo \foo +code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmm}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmm}\foo \foo \foo +code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmm}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmm}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmm}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmm}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmm}\foo \foo - \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmm}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmmm}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmmm}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7->(#1)(#2)(#3)(#4)(#5)(#6)(#7). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmmmm}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmmmm}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7#8->(#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmmmmm}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmmmmm}\foo \foo + \foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\protected\long @@ -132,83 +132,82 @@ l. ...} ============================================================ TEST 4: Commands with one long mandatory argument ============================================================ -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {+m}\foo \foo -\foo code ?{\__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {+m}\foo \foo \foo +code ?{\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1->(#1). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {m+m}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m_long:w -}. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {m+m}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mm+m}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mm+m}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmm+m}\foo \foo - \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmm+m}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmm+m}\foo \foo - \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmm+m}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmm+m}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmm+m}\foo \foo +\foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmm+m}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmm+m}\foo \foo + \foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7->(#1)(#2)(#3)(#4)(#5)(#6)(#7). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmmm+m}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmmm+m}\foo \foo + \foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7#8->(#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mmmmmmmm+m}\foo -\foo \foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m_long:w }. +> \foo=\protected macro:->\__cmd_start_expandable:nNNNNn {mmmmmmmm+m}\foo +\foo \foo code ?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\protected\long @@ -219,66 +218,66 @@ l. ...} ============================================================ TEST 5: Commands with one processed mandatory argument ============================================================ -> \foo=\protected macro:->\__xparse_start:nNNnnn {>{\foo }m}\foo \foo code -{\__xparse_grab_m:w }{}{{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {>{\foo }m}\foo \foo code +{\__cmd_grab_m:w }{}{{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1->(#1). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {m>{\foo }m}\foo \foo code -{\__xparse_grab_m_1:w \__xparse_grab_m:w }{}{{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {m>{\foo }m}\foo \foo code +{\__cmd_grab_m_1:w \__cmd_grab_m:w }{}{{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mm>{\foo }m}\foo \foo code -{\__xparse_grab_m_2:w \__xparse_grab_m:w }{}{{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mm>{\foo }m}\foo \foo code +{\__cmd_grab_m_2:w \__cmd_grab_m:w }{}{{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm>{\foo }m}\foo \foo code -{\__xparse_grab_m_3:w \__xparse_grab_m:w }{}{{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmm>{\foo }m}\foo \foo code +{\__cmd_grab_m_3:w \__cmd_grab_m:w }{}{{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm>{\foo }m}\foo \foo -code {\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmmm>{\foo }m}\foo \foo code +{\__cmd_grab_m_4:w \__cmd_grab_m:w }{}{{}{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm>{\foo }m}\foo \foo -code {\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmmmm>{\foo }m}\foo \foo code +{\__cmd_grab_m_5:w \__cmd_grab_m:w }{}{{}{}{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm>{\foo }m}\foo \foo -code {\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmmmmm>{\foo }m}\foo \foo code +{\__cmd_grab_m_6:w \__cmd_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7->(#1)(#2)(#3)(#4)(#5)(#6)(#7). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm>{\foo }m}\foo \foo -code {\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmmmmmm>{\foo }m}\foo \foo +code {\__cmd_grab_m_7:w \__cmd_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5#6#7#8->(#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm>{\foo }m}\foo \foo -code {\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {mmmmmmmm>{\foo }m}\foo \foo +code {\__cmd_grab_m_8:w \__cmd_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}. } l. ...} > \foo code=\protected\long @@ -287,117 +286,33 @@ macro:#1#2#3#4#5#6#7#8#9->(#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8)(#9). l. ...} ============================================================ ============================================================ -TEST 6: Arguments read up to first brace +TEST 6: Optional argument creation ============================================================ -> \l_test_tl=(\bar )(1). - } -l. ...} -> \l_test_tl=(100)(2). - } -l. ...} -> \l_test_tl=(\bar )(1). - } -l. ...} -> \l_test_tl=(100)(2). - } -l. ...} -============================================================ -============================================================ -TEST 7: Various mandatory combinations -============================================================ -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {lm}\foo \foo -\foo code ?{\__xparse_expandable_grab_u:w \foo (arg 1) -\__xparse_expandable_grab_m:w }. - } -l. ...} -> \foo code=\protected\long macro:#1#2->(#1)(#2). - } -l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {mlm}\foo \foo -\foo code ?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_u:w \foo -(arg 2) \__xparse_expandable_grab_m:w }. +> \foo=\protected macro:->\__cmd_start:nNNnnn {som}\foo \foo code +{\__cmd_grab_t:w *\__cmd_grab_D:w []\__cmd_grab_m_1:w }{}{}. } l. ...} > \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn -{u{end}u{stop!}}\foo \foo \foo code ?{\__xparse_expandable_grab_u:w \foo -(arg 1) \__xparse_expandable_grab_u:w \foo (arg 2) }. - } -l. ...} -> \foo code=\protected\long macro:#1#2->(#1)(#2). - } -l. ...} -> \foo=\protected macro:->\__xparse_start_expandable:nNNNNn {lll}\foo \foo -\foo code ?{\__xparse_expandable_grab_u:w \foo (arg 1) -\__xparse_expandable_grab_u:w \foo (arg 2) \__xparse_expandable_grab_u:w \foo -(arg 3) }. +> \foo=\protected macro:->\__cmd_start:nNNnnn {t+d()+m}\foo \foo code +{\__cmd_grab_t:w +\__cmd_grab_D:w ()\__cmd_grab_m_long:w }{}{}. } l. ...} > \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {+l>{\foo }u{end}}\foo \foo -code {\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}. - } -l. ...} -> \foo code=\protected\long macro:#1#2->(#1)(#2). - } -l. ...} -============================================================ -============================================================ -TEST 8: Optional argument creation -============================================================ -> \foo=\protected macro:->\__xparse_start:nNNnnn {som}\foo \foo code -{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_1:w }{}{}. - } -l. ...} -> \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). - } -l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {t+d()+m}\foo \foo code -{\__xparse_grab_t:w +\__xparse_grab_D:w ()\__xparse_grab_m_long:w }{}{}. - } -l. ...} -> \foo code=\protected\long macro:#1#2#3->(#1)(#2)(#3). - } -l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {+t\par O{default}mmm}\foo -\foo code {\__xparse_grab_t:w \par \__xparse_grab_D:w []\__xparse_grab_m_3:w -}{\c_novalue_tl {\prg_do_nothing: default}\c_novalue_tl \c_novalue_tl -\c_novalue_tl }{}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {+t\par O{default}mmm}\foo \foo +code {\__cmd_grab_t:w \par \__cmd_grab_D:w []\__cmd_grab_m_3:w }{\c_novalue_tl +{\prg_do_nothing: default}\c_novalue_tl \c_novalue_tl \c_novalue_tl }{}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4). } l. ...} -> \foo=\protected macro:->\__xparse_start:nNNnnn {momo}\foo \foo code -{\__xparse_grab_m_1:w \__xparse_grab_D:w []\__xparse_grab_m_1:w -\__xparse_grab_D:w []}{}{}. - } -l. ...} -> \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). - } -l. ...} -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -> \foo=\protected macro:->\__xparse_start:nNNnnn {mgom}\foo \foo code -{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_D:w -[]\__xparse_grab_m_1:w }{}{}. - } -l. ...} -> \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). - } -l. ...} -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -> \foo=\protected macro:->\__xparse_start:nNNnnn {mG{test}sm}\foo \foo code -{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_t:w -*\__xparse_grab_m_1:w }{\c_novalue_tl {\prg_do_nothing: test}\c_novalue_tl -\c_novalue_tl }{}. +> \foo=\protected macro:->\__cmd_start:nNNnnn {momo}\foo \foo code +{\__cmd_grab_m_1:w \__cmd_grab_D:w []\__cmd_grab_m_1:w \__cmd_grab_D:w +[]}{}{}. } l. ...} > \foo code=\protected\long macro:#1#2#3#4->(#1)(#2)(#3)(#4). @@ -405,7 +320,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 9: Unknown argument types +TEST 7: Unknown argument types ============================================================ ! LaTeX3 Error: Unknown argument type 'n' for the command '\foo'. For immediate help type H . @@ -433,57 +348,54 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 10: Some valid expandable functions +TEST 8: Some valid expandable functions ============================================================ -> \foo=macro:->\__xparse_start_expandable:nNNNNn {m}\foo \foo \foo code -?{\__xparse_expandable_grab_m:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {m}\foo \foo \foo code +?{\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\long macro:#1->(#1). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {+m}\foo \foo \foo code -?{\__xparse_expandable_grab_m_long:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {+m}\foo \foo \foo code +?{\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\long macro:#1->(#1). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {mmm}\foo \foo \foo code -?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w -\__xparse_expandable_grab_m:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {mmm}\foo \foo \foo code +?{\__cmd_expandable_grab_m:w \__cmd_expandable_grab_m:w +\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\long macro:#1#2#3->(#1)(#2)(#3). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {om}\foo \foo \foo code -?{\__xparse_expandable_grab_D:w \foo (arg 1) []\__xparse_expandable_grab_m:w -}. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {om}\foo \foo \foo code +?{\__cmd_expandable_grab_D:w \foo (arg 1) []\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {+o+m}\foo \foo \foo code -?{\__xparse_expandable_grab_D:w \foo (arg 1) -[]\__xparse_expandable_grab_m_long:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {+o+m}\foo \foo \foo code +?{\__cmd_expandable_grab_D:w \foo (arg 1) []\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {sm}\foo \foo \foo code -?{\__xparse_expandable_grab_t:w \__xparse_grabber_*:w -*\__xparse_expandable_grab_m:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {sm}\foo \foo \foo code +?{\__cmd_expandable_grab_t:w \__cmd_grabber_*:w *\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\long macro:#1#2->(#1)(#2). } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {osm}\foo \foo \foo code -?{\__xparse_expandable_grab_D:w \foo (arg 1) []\__xparse_expandable_grab_t:w -\__xparse_grabber_*:w *\__xparse_expandable_grab_m:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {osm}\foo \foo \foo code +?{\__cmd_expandable_grab_D:w \foo (arg 1) []\__cmd_expandable_grab_t:w +\__cmd_grabber_*:w *\__cmd_expandable_grab_m:w }. } l. ...} > \foo code=\long macro:#1#2#3->(#1)(#2)(#3). @@ -491,7 +403,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 11: Not valid as expandable functions +TEST 9: Not valid as expandable functions ============================================================ ! LaTeX3 Error: Argument specification 'mo' for expandable command '\foo' ends (LaTeX3) with optional argument. @@ -518,9 +430,8 @@ l. ...} > \foo code=undefined. } l. ...} -> \foo=macro:->\__xparse_start_expandable:nNNNNn {o+m}\foo \foo \foo code -?{\__xparse_expandable_grab_D:w \foo (arg 1) -[]\__xparse_expandable_grab_m_long:w }. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {o+m}\foo \foo \foo code +?{\__cmd_expandable_grab_D:w \foo (arg 1) []\__cmd_expandable_grab_m_long:w }. } l. ...} > \foo code=\long macro:#1#2->(#1)(#2). @@ -544,7 +455,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 12: Checking for existing environments +TEST 10: Checking for existing environments ============================================================ ! LaTeX3 Error: Environment 'foo' already defined! For immediate help type H . @@ -560,70 +471,57 @@ l. ...} You have used \RenewDocumentEnvironment with an environment that was never defined. LaTeX will ignore this entire definition. -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn {}{foo}{}{}{}. +> \environment foo=\protected macro:->\__cmd_start_env:nnnnn {}{foo}{}{}{}. } l. ...} > \environment foo code=\protected\long macro:->\cs_set_nopar:Npx \environment -foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }First. +foo end aux {\exp_not:N \environment foo end aux \exp_not:o \l__cmd_args_tl +}First. } l. ...} ============================================================ ============================================================ -TEST 13: Valid environment declarations +TEST 11: Valid environment declarations ============================================================ -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn -{mmm}{foo}{\__xparse_grab_m_3:w }{}{}. +> \environment foo=\protected macro:->\__cmd_start_env:nnnnn +{mmm}{foo}{\__cmd_grab_m_3:w }{}{}. } l. ...} > \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx \environment foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }(#1)(#2)(#3). +\l__cmd_args_tl }(#1)(#2)(#3). } l. ...} -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn -{som}{foo}{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_1:w -}{}{}. +> \environment foo=\protected macro:->\__cmd_start_env:nnnnn +{som}{foo}{\__cmd_grab_t:w *\__cmd_grab_D:w []\__cmd_grab_m_1:w }{}{}. } l. ...} > \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx \environment foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }(#1)(#2)(#3). +\l__cmd_args_tl }(#1)(#2)(#3). } l. ...} -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn -{so+m}{foo}{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_long:w -}{}{}. +> \environment foo=\protected macro:->\__cmd_start_env:nnnnn +{so+m}{foo}{\__cmd_grab_t:w *\__cmd_grab_D:w []\__cmd_grab_m_long:w }{}{}. } l. ...} > \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx \environment foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }(#1)(#2)(#3). +\l__cmd_args_tl }(#1)(#2)(#3). } l. ...} -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn -{u{stop}om}{foo}{\__xparse_grab_u:w {stop}\__xparse_grab_D:w -[]\__xparse_grab_m_1:w }{}{}. - } -l. ...} -> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx -\environment foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }(#1)(#2)(#3). - } -l. ...} -> \environment foo=\protected macro:->\__xparse_start_env:nnnnn -{moo}{foo}{\__xparse_grab_m_1:w \__xparse_grab_D:w []\__xparse_grab_D:w -[]}{}{}. +> \environment foo=\protected macro:->\__cmd_start_env:nnnnn +{moo}{foo}{\__cmd_grab_m_1:w \__cmd_grab_D:w []\__cmd_grab_D:w []}{}{}. } l. ...} > \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx \environment foo end aux {\exp_not:N \environment foo end aux \exp_not:o -\l__xparse_args_tl }(#1)(#2)(#3). +\l__cmd_args_tl }(#1)(#2)(#3). } l. ...} ============================================================ ============================================================ -TEST 14: Environment groups: should show "outside" and 1 +TEST 12: Environment groups: should show "outside" and 1 ============================================================ > \l_test_tl=outside. } @@ -645,7 +543,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 15: Passing args to end of environments: display correct args +TEST 13: Passing args to end of environments: display correct args ============================================================ > (A). } @@ -661,7 +559,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 16: Nested environments +TEST 14: Nested environments ============================================================ > \@currenvir=foo. } @@ -671,7 +569,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 17: Passing arguments to the end with more complex cases +TEST 15: Passing arguments to the end with more complex cases ============================================================ > \box...= \hbox(6.94444+1.94444)x142.50034 @@ -712,7 +610,7 @@ TEST 17: Passing arguments to the end with more complex cases l. ... } ============================================================ ============================================================ -TEST 18: Expansion at end of environment +TEST 16: Expansion at end of environment ============================================================ LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line .... @@ -799,28 +697,26 @@ LaTeX Font Info: External font `cmex10' loaded for size l. ... } ============================================================ ============================================================ -TEST 19: (ab)using xparse commands in csnames +TEST 17: (ab)using xparse commands in csnames ============================================================ \test-abc-def -\test-test-abc -\test-abc.{def} ! Missing \endcsname inserted. \xparse function is not expandable l. ... } The control sequence marked should not appear between \csname and \endcsname. -\test- \xparse function is not expandable \bool_set_false:N \l__xparse_environment_bool \__xparse_start_aux:NNnnnn \foo code {D...}{\__xparse_grab_D:w ..}{{.}}{}....\cs_end: +\test- \xparse function is not expandable \bool_set_false:N \l__cmd_environment_bool \__cmd_start_aux:NNnnnn \foo code {D...}{\__cmd_grab_D:w ..}{{.}}{}....\cs_end: ! Missing \endcsname inserted. \xparse function is not expandable l. ... } The control sequence marked should not appear between \csname and \endcsname. -\test- \xparse function is not expandable \relax \bool_set_false:N \l__xparse_environment_bool \__xparse_start_aux:NNnnnn \foo code {D...}{\__xparse_grab_D:w ..}{{.}}{}....\cs_end: +\test- \xparse function is not expandable \relax \bool_set_false:N \l__cmd_environment_bool \__cmd_start_aux:NNnnnn \foo code {D...}{\__cmd_grab_D:w ..}{{.}}{}....\cs_end: ============================================================ ============================================================ -TEST 20: Checking for existing expandable definitions +TEST 18: Checking for existing expandable definitions ============================================================ ! LaTeX3 Error: Command '\foo' already defined! For immediate help type H . @@ -836,7 +732,7 @@ l. ...} You have used \RenewExpandableDocumentCommand with a command that was never defined. LaTeX will ignore this entire definition. -> \foo=macro:->\__xparse_start_expandable:nNNNNn {}\foo \foo \foo code ?{}. +> \foo=macro:->\__cmd_start_expandable:nNNNNn {}\foo \foo \foo code ?{}. } l. ...} > \foo code=\long macro:->First definition. diff --git a/base/testfiles-ltcmd/ltcmd002.lvt b/base/testfiles-ltcmd/ltcmd002.lvt index 90de5d7b5..66b4c1351 100644 --- a/base/testfiles-ltcmd/ltcmd002.lvt +++ b/base/testfiles-ltcmd/ltcmd002.lvt @@ -7,7 +7,7 @@ \ExplSyntaxOn \debug_on:n { check-declarations , deprecation , log-functions } \ExplSyntaxOff -\RequirePackage{xparse} +% \RequirePackage{xparse} \begin{document} \START \AUTHOR{Joseph Wright} @@ -79,36 +79,38 @@ \foo a [ b \par } -\TEST{More~variation~of~type~with~valid~arguments}{ - \DeclareDocumentCommand \foo { g o m } { \TYPE { (#1) (#2) (#3) } } - \foo a b c - \foo {text} b c - \foo ~{text} [opt] {text} - \DeclareDocumentCommand \foo { m m G{default} } - { \TYPE { (#1) (#2) (#3) } } - \foo d e f - \foo d e {text} - \foo d e~{text} - \DeclareDocumentCommand \foo { l m m } { \TYPE { (#1) (#2) (#3) } } - \foo g~ {h} i - \DeclareDocumentCommand \foo { u{stop} m m } - { \TYPE { (#1) (#2) (#3) } } - \foo jstophere - \foo stophere -} +% Disabled: test requires deprecated xparse.sty +% \TEST{More~variation~of~type~with~valid~arguments}{ +% \DeclareDocumentCommand \foo { g o m } { \TYPE { (#1) (#2) (#3) } } +% \foo a b c +% \foo {text} b c +% \foo ~{text} [opt] {text} +% \DeclareDocumentCommand \foo { m m G{default} } +% { \TYPE { (#1) (#2) (#3) } } +% \foo d e f +% \foo d e {text} +% \foo d e~{text} +% \DeclareDocumentCommand \foo { l m m } { \TYPE { (#1) (#2) (#3) } } +% \foo g~ {h} i +% \DeclareDocumentCommand \foo { u{stop} m m } +% { \TYPE { (#1) (#2) (#3) } } +% \foo jstophere +% \foo stophere +% } -\TEST{Variation~of~type~with~invalid~arguments}{ - \DeclareDocumentCommand \foo { g o m } { \TYPE { (#1) (#2) (#3) } } - \foo {\par} b c - \DeclareDocumentCommand \foo { m m G{default} } - { \TYPE { (#1) (#2) (#3) } } - \foo d e {\par} - \DeclareDocumentCommand \foo { l m m } { \TYPE { (#1) (#2) (#3) } } - \foo g~ h i \par - \DeclareDocumentCommand \foo { u{stop} m m } - { \TYPE { (#1) (#2) (#3) } } - \foo j \par -} +% Disabled: test requires deprecated xparse.sty +% \TEST{Variation~of~type~with~invalid~arguments}{ +% \DeclareDocumentCommand \foo { g o m } { \TYPE { (#1) (#2) (#3) } } +% \foo {\par} b c +% \DeclareDocumentCommand \foo { m m G{default} } +% { \TYPE { (#1) (#2) (#3) } } +% \foo d e {\par} +% \DeclareDocumentCommand \foo { l m m } { \TYPE { (#1) (#2) (#3) } } +% \foo g~ h i \par +% \DeclareDocumentCommand \foo { u{stop} m m } +% { \TYPE { (#1) (#2) (#3) } } +% \foo j \par +% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \TEST{Optional~argument~tests}{ \DeclareDocumentCommand \foo { o m } diff --git a/base/testfiles-ltcmd/ltcmd002.tlg b/base/testfiles-ltcmd/ltcmd002.tlg index 9a218dcdf..31f7b5233 100644 --- a/base/testfiles-ltcmd/ltcmd002.tlg +++ b/base/testfiles-ltcmd/ltcmd002.tlg @@ -83,84 +83,7 @@ control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best. ============================================================ ============================================================ -TEST 4: More variation of type with valid arguments -============================================================ -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -(-NoValue-)(-NoValue-)(a) -(text)(-NoValue-)(b) -(text)(opt)(text) -(d)(e)(default) -(d)(e)(text) -(d)(e)(text) -(g )(h)(i) -(j)(h)(e) -()(h)(e) -============================================================ -============================================================ -TEST 5: Variation of type with invalid arguments -============================================================ -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -Runaway argument? -{ -! Paragraph ended before \foo was complete. - - \par -l. ...} -I suspect you've forgotten a `}', causing me to apply this -control sequence to too much text. How can we recover? -My plan is to forget the whole thing and hope for the best. -! Extra }, or forgotten \endgroup. - ...\TYPE {(##1)(##2)(##3)}}\foo {\par } - bc\DeclareDocumentCommand ... -l. ...} -I've deleted a group-closing symbol because it seems to be -spurious, as in `$x}$'. But perhaps the } is legitimate and -you forgot something else, as in `\hbox{$x}'. In such cases -the way to recover is to insert both the forgotten and the -deleted material, e.g., by typing `I$}'. -Runaway argument? -{ -! Paragraph ended before \foo was complete. - - \par -l. ...} -I suspect you've forgotten a `}', causing me to apply this -control sequence to too much text. How can we recover? -My plan is to forget the whole thing and hope for the best. -! Extra }, or forgotten \endgroup. - ...YPE {(##1)(##2)(##3)}}\foo de{\par } - \DeclareDocumentCommand \f... -l. ...} -I've deleted a group-closing symbol because it seems to be -spurious, as in `$x}$'. But perhaps the } is legitimate and -you forgot something else, as in `\hbox{$x}'. In such cases -the way to recover is to insert both the forgotten and the -deleted material, e.g., by typing `I$}'. -Runaway argument? -g hi -! Paragraph ended before \foo (arg 1) was complete. - - \par -l. ...} -I suspect you've forgotten a `}', causing me to apply this -control sequence to too much text. How can we recover? -My plan is to forget the whole thing and hope for the best. -Runaway argument? -j -! Paragraph ended before \foo (arg 1) was complete. - - \par -l. ...} -I suspect you've forgotten a `}', causing me to apply this -control sequence to too much text. How can we recover? -My plan is to forget the whole thing and hope for the best. -============================================================ -============================================================ -TEST 6: Optional argument tests +TEST 4: Optional argument tests ============================================================ TRUE FALSE @@ -175,7 +98,7 @@ TRUE TRUE ============================================================ ============================================================ -TEST 7: Trailing optional arguments +TEST 5: Trailing optional arguments ============================================================ FALSE TRUE @@ -209,7 +132,7 @@ TRUE FALSE ============================================================ ============================================================ -TEST 8: Awkward `NoValue' checks (expect T/F/F/F/F) +TEST 6: Awkward `NoValue' checks (expect T/F/F/F/F) ============================================================ TRUE FALSE @@ -218,7 +141,7 @@ FALSE FALSE ============================================================ ============================================================ -TEST 9: Nested optional arguments +TEST 7: Nested optional arguments ============================================================ > -NoValue-. } @@ -249,7 +172,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 10: Processing arguments +TEST 8: Processing arguments ============================================================ 1,2 - @@ -259,7 +182,7 @@ TEST 10: Processing arguments 3,-NoValue- ============================================================ ============================================================ -TEST 11: Optional argument tests expand (expect T/F/F/F/T) +TEST 9: Optional argument tests expand (expect T/F/F/F/T) ============================================================ > \test=TRUE. } @@ -278,7 +201,7 @@ l. ...} l. ...} ============================================================ ============================================================ -TEST 12: Fully expandable functions +TEST 10: Fully expandable functions ============================================================ (a)(b) (-NoValue-)(c) @@ -293,7 +216,7 @@ TEST 12: Fully expandable functions (a)(b)(c)(d) ============================================================ ============================================================ -TEST 13: Fully expandable long functions +TEST 11: Fully expandable long functions ============================================================ (\par )(b) (-NoValue-)(\par ) @@ -308,7 +231,7 @@ TEST 13: Fully expandable long functions (\par )(\par )(\par )(\par ) ============================================================ ============================================================ -TEST 14: More tricky expandable tests +TEST 12: More tricky expandable tests ============================================================ ()(b) ()(b) diff --git a/base/testfiles-ltcmd/ltcmd003.lvt b/base/testfiles-ltcmd/ltcmd003.lvt index aa53d95a9..be72d75c5 100644 --- a/base/testfiles-ltcmd/ltcmd003.lvt +++ b/base/testfiles-ltcmd/ltcmd003.lvt @@ -9,7 +9,7 @@ \ExplSyntaxOn \debug_on:n { check-declarations , deprecation , log-functions } \ExplSyntaxOff -\RequirePackage{xparse} +% \RequirePackage{xparse} \begin{document} @@ -66,45 +66,47 @@ \foo# {} \halign{#\cr\foo{%#&\}{}\cr} +% Disabled: test requires deprecated xparse.sty +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \ExplSyntaxOn +% \OMIT +% \cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx } +% \TIMO +% \DeclareDocumentCommand{\foo}{ o +v g +v m } % #5 just used for cleanup +% { +% \tl_set:Nx \l_tmpa_tl +% { +% I've~got~\iow_char:N\\foo +% \IfValueT {#1} { \tl_to_str:n { [#1] } } -#2- +% \IfValueT {#3} { \tl_to_str:n { {#3} } } -#4- +% } +% \tl_replace_all:Nxx \l_tmpa_tl { \iow_char:N\^^M } { \iow_newline: } +% \iow_term:x { \tl_to_str:N \l_tmpa_tl } +% } +% \ExplSyntaxOff +% \foo[x]& +% a%bc +% d#+ef +% &+ +% g h&~i +% +{} +% \foo"!@#%^&"{\a}+ +% %$+{} +% \foo|%}#${|{}{%#$|+}{} +% \foo{%#$|+}||{} +% \foo{@#${%{$}#}}{}{${{{{}}}}}{} +% \foo{{{}}}{}{}{} +% \foo{}{}{}{} +% \foo{ +% }{ }{ +% }{} +% \foo# + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ExplSyntaxOn -\OMIT -\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx } -\TIMO -\DeclareDocumentCommand{\foo}{ o +v g +v m } % #5 just used for cleanup - { - \tl_set:Nx \l_tmpa_tl - { - I've~got~\iow_char:N\\foo - \IfValueT {#1} { \tl_to_str:n { [#1] } } -#2- - \IfValueT {#3} { \tl_to_str:n { {#3} } } -#4- - } - \tl_replace_all:Nxx \l_tmpa_tl { \iow_char:N\^^M } { \iow_newline: } - \iow_term:x { \tl_to_str:N \l_tmpa_tl } - } -\ExplSyntaxOff -\foo[x]& -a%bc -d#+ef -&+ -g h&~i -+{} -\foo"!@#%^&"{\a}+ -%$+{} -\foo|%}#${|{}{%#$|+}{} -\foo{%#$|+}||{} -\foo{@#${%{$}#}}{}{${{{{}}}}}{} -\foo{{{}}}{}{}{} -\foo{}{}{}{} -\foo{ -}{ }{ -}{} -\foo# -\ExplSyntaxOn \DeclareDocumentCommand{\foo}{v}{\tl_show:n{#1}} \ExplSyntaxOff \halign{#\cr\foo&ab&\cr} - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \END diff --git a/base/testfiles-ltcmd/ltcmd003.tlg b/base/testfiles-ltcmd/ltcmd003.tlg index 5ab8b74d2..d5ea9b971 100644 --- a/base/testfiles-ltcmd/ltcmd003.tlg +++ b/base/testfiles-ltcmd/ltcmd003.tlg @@ -67,37 +67,6 @@ argument of another function. It received an illegal token '##'. LaTeX will ignore ''. I got '\foo--NoValue--{##} I got '\foo-%#&\-{} -I've got \foo[x]- -a%bc -d#+ef --- -g h&~i -- -I've got \foo-!@#%^&-{\a }- -%$- -I've got \foo-%}#${-{}-%#$|+- -I've got \foo-%#$|+--- -I've got \foo-@#${%{$}#}-{}-${{{{}}}}- -I've got \foo-{{}}-{}-- -I've got \foo--{}-- -I've got \foo- --{ }- -- -! LaTeX3 Error: The verbatim command '\foo' cannot be used inside an argument. -For immediate help type H . - ... -l. ...\foo# -The command '\foo' takes a verbatim argument. It may not appear within the -argument of another function. It received an illegal token '##'. -LaTeX will ignore ''. -! LaTeX3 Error: The verbatim command '\foo' cannot be used inside an argument. -For immediate help type H . - ... -l. ...\foo# -The command '\foo' takes a verbatim argument. It may not appear within the -argument of another function. It received an illegal token '##'. -LaTeX will ignore ''. -I've got \foo--NoValue----NoValue-- > ab. } l. ...\halign{#\cr\foo&ab& diff --git a/base/testfiles-ltcmd/ltcmd004.lvt b/base/testfiles-ltcmd/ltcmd004.lvt index 02bac0458..fa4c3ff1e 100644 --- a/base/testfiles-ltcmd/ltcmd004.lvt +++ b/base/testfiles-ltcmd/ltcmd004.lvt @@ -7,7 +7,7 @@ \ExplSyntaxOn \debug_on:n { check-declarations , deprecation , log-functions } \ExplSyntaxOff -\RequirePackage{xparse} +% \RequirePackage{xparse} \begin{document} \START \AUTHOR{Joseph Wright, Bruno Le Floch} @@ -160,18 +160,19 @@ { \OMIT \DeclareDocumentCommand { \null } { } { } - \DeclareDocumentCommand { \foo } { >{\SplitList{;}} m +o g } { } + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentCommand { \foo } { >{\SplitList{;}} m +o g } { } \DeclareDocumentEnvironment { nullenv } { } { } { } - \DeclareDocumentEnvironment { fooenv } { v D{$}{$} l u{!} } { } { } + % \DeclareDocumentEnvironment { fooenv } { v D{$}{$} l u{!} } { } { } \TIMO \GetDocumentCommandArgSpec { \null } \TYPE { | \ArgumentSpecification | } \ShowDocumentCommandArgSpec { \null } - \GetDocumentCommandArgSpec { \foo } \TYPE { | \ArgumentSpecification | } - \ShowDocumentCommandArgSpec { \foo } + % \GetDocumentCommandArgSpec { \foo } \TYPE { | \ArgumentSpecification | } + % \ShowDocumentCommandArgSpec { \foo } \GetDocumentEnvironmentArgSpec { nullenv } \TYPE { | \ArgumentSpecification | } \ShowDocumentEnvironmentArgSpec { nullenv } - \GetDocumentEnvironmentArgSpec { fooenv } \TYPE { | \ArgumentSpecification | } - \ShowDocumentEnvironmentArgSpec { fooenv } + % \GetDocumentEnvironmentArgSpec { fooenv } \TYPE { | \ArgumentSpecification | } + % \ShowDocumentEnvironmentArgSpec { fooenv } } \TEST { First~argument~must~be~a~command } @@ -224,25 +225,26 @@ { \foo { a ( b } } } -\TEST { Test~#~in~argument~specification } - { - \DeclareDocumentCommand { \foo } - { D<>{##} G{##} t* E{_^}{{1##}{2##}} l m R(){##} u{...} } - { \TYPE { #1 | #2 | #3 | {#4}{#5} | #6 | #7 | #8 | #9 | D } } - \foo<1>...{A}C... - \foo{1}...{A}(B)C... - \foo*...{A}(B)C... - \foo^1...{A}(B)C... - \foo<1>{2}*_3^4...{A}(B)C... - \DeclareDocumentCommand { \foo } - { +D<>{##} +G{##} +t* +E{_^}{{1##}{2##}} +l +m +R(){##} +u{...} } - { \TYPE { #1 | #2 | #3 | {#4}{#5} | #6 | #7 | #8 | #9 | D } } - \foo<1>...{A}C... - \foo{1}...{A}(B)C... - \foo*...{A}(B)C... - \foo^1...{A}(B)C... - \foo<1>{2}*_3^4...{A}(B)C... - } +% Disabled: test requires deprecated xparse.sty +% \TEST { Test~#~in~argument~specification } +% { +% \DeclareDocumentCommand { \foo } +% { D<>{##} G{##} t* E{_^}{{1##}{2##}} l m R(){##} u{...} } +% { \TYPE { #1 | #2 | #3 | {#4}{#5} | #6 | #7 | #8 | #9 | D } } +% \foo<1>...{A}C... +% \foo{1}...{A}(B)C... +% \foo*...{A}(B)C... +% \foo^1...{A}(B)C... +% \foo<1>{2}*_3^4...{A}(B)C... +% \DeclareDocumentCommand { \foo } +% { +D<>{##} +G{##} +t* +E{_^}{{1##}{2##}} +l +m +R(){##} +u{...} } +% { \TYPE { #1 | #2 | #3 | {#4}{#5} | #6 | #7 | #8 | #9 | D } } +% \foo<1>...{A}C... +% \foo{1}...{A}(B)C... +% \foo*...{A}(B)C... +% \foo^1...{A}(B)C... +% \foo<1>{2}*_3^4...{A}(B)C... +% } \TEST { Defaults~referring~to~other~arguments } { @@ -257,15 +259,16 @@ \margins [1cm] {a} {b} \margins {a} [1cm] {b} \margins [1cm] {a} [2cm] {b} - \DeclareDocumentCommand {\foo} - { D<>{#2} G{#5#1} E{_^}{{1}{2}} O{{#3}{#4}#6} m } - { \TYPE { \exp_not:n { #1 | #2 | {#3}{#4} | #5 | #6 } } } - \foo<\A>_{\B}{\C} - \foo{\A}{\B} - \foo{\A}[\B]{\C} - \foo ^{\A}{\B} - \foo[]{\B} - \foo<\A>_{\B}^{\C}{\D} + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentCommand {\foo} + % { D<>{#2} G{#5#1} E{_^}{{1}{2}} O{{#3}{#4}#6} m } + % { \TYPE { \exp_not:n { #1 | #2 | {#3}{#4} | #5 | #6 } } } + % \foo<\A>_{\B}{\C} + % \foo{\A}{\B} + % \foo{\A}[\B]{\C} + % \foo ^{\A}{\B} + % \foo[]{\B} + % \foo<\A>_{\B}^{\C}{\D} \DeclareDocumentCommand {\foo} { O{#2} O{#3} O{#4} O{#5} O{#6} O{#7} O{#8} O{#9} m } { \TYPE { \exp_not:n {#1} } } @@ -333,10 +336,11 @@ \foo :a:b,c,:d. \DeclareDocumentCommand { \foo } { o s r[] } { \TYPE{|#1|#2|#3|} } \foo *[a] - \DeclareDocumentCommand { \foo } { g m } { \TYPE{|#1|#2|} } - \foo a \foo {a}{b} - \DeclareDocumentCommand { \foo } { G{} m } { \TYPE{|#1|#2|} } - \foo a \foo {a}{b} + % Disabled: test requires deprecated xparse.sty + % \DeclareDocumentCommand { \foo } { g m } { \TYPE{|#1|#2|} } + % \foo a \foo {a}{b} + % \DeclareDocumentCommand { \foo } { G{} m } { \TYPE{|#1|#2|} } + % \foo a \foo {a}{b} \DeclareDocumentCommand { \foo } { s r** } { \TYPE{|#1|#2|} } \foo **a* \DeclareDocumentCommand { \foo } { t( r() t) } { \TYPE{|#1|#2|#3|} } @@ -412,17 +416,18 @@ \TYPE { \foo * [ [ \A ] ] { \B } } } -\TEST { Expandable~l/u~arguments } - { - \DeclareExpandableDocumentCommand { \A } { u{def} } { \exp_not:n { |#1| } } - \TYPE { \A {def} ghi def } - \DeclareExpandableDocumentCommand { \B } { l } { \exp_not:n { |#1| } } - \TYPE { \B abc { def } } - \DeclareExpandableDocumentCommand { \C } { o l m } { \exp_not:n { |#1|#2|#3| } } - \TYPE { \C [abc]{def} } - \DeclareDocumentCommand { \D } { o l m } { \TYPE { |#1|#2|#3| } } - \D [abc]{def} - } +% Disabled: test requires deprecated xparse.sty +% \TEST { Expandable~l/u~arguments } +% { +% \DeclareExpandableDocumentCommand { \A } { u{def} } { \exp_not:n { |#1| } } +% \TYPE { \A {def} ghi def } +% \DeclareExpandableDocumentCommand { \B } { l } { \exp_not:n { |#1| } } +% \TYPE { \B abc { def } } +% \DeclareExpandableDocumentCommand { \C } { o l m } { \exp_not:n { |#1|#2|#3| } } +% \TYPE { \C [abc]{def} } +% \DeclareDocumentCommand { \D } { o l m } { \TYPE { |#1|#2|#3| } } +% \D [abc]{def} +% } \TEST { Same~expandable~command~with/without~defaults } { diff --git a/base/testfiles-ltcmd/ltcmd004.tlg b/base/testfiles-ltcmd/ltcmd004.tlg index ee2b073da..3be3c7f90 100644 --- a/base/testfiles-ltcmd/ltcmd004.tlg +++ b/base/testfiles-ltcmd/ltcmd004.tlg @@ -219,18 +219,10 @@ TEST 9: Get and show argument spec > \ArgumentSpecification=. } l. ... } -|>{\SplitList {;}}m+og| -> \ArgumentSpecification=>{\SplitList {;}}m+og. - } -l. ... } || > \ArgumentSpecification=. } l. ... } -|vD{$}{$}lu{!}| -> \ArgumentSpecification=vD{$}{$}lu{!}. - } -l. ... } ============================================================ ============================================================ TEST 10: First argument must be a command @@ -517,33 +509,7 @@ TEST 11: SplitList > {a(b}. ============================================================ ============================================================ -TEST 12: Test ## in argument specification -============================================================ -! LaTeX3 Error: Missing required argument for command '\foo'. -For immediate help type H . - ... -l. ... } -The current command '\foo' expects an argument starting with '('. LaTeX did -not find it, and will insert a default value to be processed. -1|##|\BooleanFalse |{1##}{2##}|...|A|##|C|D -##|1|\BooleanFalse |{1##}{2##}|...|A|B|C|D -##|##|\BooleanTrue |{1##}{2##}|...|A|B|C|D -##|##|\BooleanFalse |{1##}{1}|...|A|B|C|D -1|2|\BooleanTrue |{3}{4}|...|A|B|C|D -! LaTeX3 Error: Missing required argument for command '\foo'. -For immediate help type H . - ... -l. ... } -The current command '\foo' expects an argument starting with '('. LaTeX did -not find it, and will insert a default value to be processed. -1|##|\BooleanFalse |{1##}{2##}|...|A|##|C|D -##|1|\BooleanFalse |{1##}{2##}|...|A|B|C|D -##|##|\BooleanTrue |{1##}{2##}|...|A|B|C|D -##|##|\BooleanFalse |{1##}{1}|...|A|B|C|D -1|2|\BooleanTrue |{3}{4}|...|A|B|C|D -============================================================ -============================================================ -TEST 13: Defaults referring to other arguments +TEST 12: Defaults referring to other arguments ============================================================ (walk,walked,walked) (find,found,found) @@ -552,21 +518,6 @@ TEST 13: Defaults referring to other arguments (1cm,a,1cm,b) (1cm,a,1cm,b) (1cm,a,2cm,b) -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -\A |{\B }{2}\C \A |{\B }{2}|{\B }{2}\C |\C -\A |\A |{1}{2}|{1}{2}\B |\B -\A |\A |{1}{2}|\B |\C -! LaTeX3 Error: Defaults of command '\foo' have circular dependency. -For immediate help type H . - ... -l. ... } -The default values of two or more arguments of the command '\foo' depend on -each other in a way that cannot be resolved. -{1}{\A }\B {1}{\A }\B {1}{\A }\B {-NoValue-}{\A }\B -NoValue-|{1}{\A }\B {1}{\A }\B {1}{\A }\B {1}{\A }\B -NoValue--NoValue-|{1}{\A }|{1}{\A }\B |\B --NoValue-|-NoValue-|{1}{2}||\B -\A |{\B }{\C }\D \A |{\B }{\C }|{\B }{\C }\D |\D \A {{\C }{-NoValue-}}{\E }|{\C }{-NoValue-}|\E {\A }{\E }|{{\A }{\E }}{-NoValue-}|\E @@ -574,7 +525,7 @@ each other in a way that cannot be resolved. {\A }{\B }|{{\A }{\B }}{\D }|\E ============================================================ ============================================================ -TEST 14: Test ## in expandable argument specification +TEST 13: Test ## in expandable argument specification ============================================================ ! Undefined control sequence. \LaTeX3 error: @@ -591,7 +542,7 @@ and I'll forget about whatever was undefined. 1|\BooleanTrue |##|2## ============================================================ ============================================================ -TEST 15: Refer to other args (expandable) +TEST 14: Refer to other args (expandable) ============================================================ ! Undefined control sequence. \LaTeX3 error: @@ -619,7 +570,7 @@ and I'll forget about whatever was undefined. \A ============================================================ ============================================================ -TEST 16: Bad arguments +TEST 15: Bad arguments ============================================================ ! LaTeX3 Error: Unknown argument type 'abc' for the command '\foo'. For immediate help type H . @@ -672,7 +623,7 @@ LaTeX will ignore this entire definition. undefined ============================================================ ============================================================ -TEST 17: Optional+mandatory with same delimiter +TEST 16: Optional+mandatory with same delimiter ============================================================ LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '[' (LaTeX3) as a previous optional argument, it will not be possible to @@ -694,16 +645,6 @@ LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '[' (LaTeX3) as a previous optional argument, it will not be possible to (LaTeX3) omit all optional arguments when calling this command. |-NoValue-|\BooleanTrue |a| -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -|-NoValue-|a| -|a|b| -LaTeX3 Warning: Since the mandatory argument 'm' has the same delimiter '{' as -(LaTeX3) a previous optional argument, it will not be possible to omit -(LaTeX3) all optional arguments when calling this command. -||a| -|a|b| LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '*' (LaTeX3) as a previous optional argument, it will not be possible to (LaTeX3) omit all optional arguments when calling this command. @@ -720,7 +661,7 @@ LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '_' |{-NoValue-}{-NoValue-}|\BooleanTrue |a| ============================================================ ============================================================ -TEST 18: par in short expandable +TEST 17: par in short expandable ============================================================ Runaway argument? \ERROR @@ -745,13 +686,13 @@ My plan is to forget the whole thing and hope for the best. \par ============================================================ ============================================================ -TEST 19: Environments and expansion +TEST 18: Environments and expansion ============================================================ \A \B \C \A \B \C ============================================================ ============================================================ -TEST 20: Expandable r type +TEST 19: Expandable r type ============================================================ LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '[' (LaTeX3) as a previous optional argument, it will not be possible to @@ -760,7 +701,7 @@ LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '[' |a|b| ============================================================ ============================================================ -TEST 21: Expandable e-type argument definitions +TEST 20: Expandable e-type argument definitions ============================================================ ({-NoValue-}{-NoValue-})(\the re) ({\u p}{-NoValue-})(\he re) @@ -781,7 +722,7 @@ TEST 21: Expandable e-type argument definitions ({\B }{\A })(\C )(\D ) ============================================================ ============================================================ -TEST 22: Long status of t-type ignored +TEST 21: Long status of t-type ignored ============================================================ |\BooleanTrue |\BooleanTrue |\par |\par | |\BooleanFalse |\BooleanTrue |-NoValue-|\par \A | @@ -797,56 +738,31 @@ My plan is to forget the whole thing and hope for the best. |\BooleanFalse |\BooleanTrue |[\A ]|\B | ============================================================ ============================================================ -TEST 23: Expandable l/u arguments -============================================================ -|{def}ghi| -|abc|{def} -! LaTeX3 Error: Argument type 'l' not available after optional argument for -(LaTeX3) expandable command '\C'. -For immediate help type H . - ... -l. ... } -The letter 'l' specifies an argument type which cannot be used in an -expandable command after an optional argument. -LaTeX will ignore this entire definition. -! Undefined control sequence. - \C - [abc]{def} -l. ... } -The control sequence at the end of the top line -of your error message was never \def'ed. If you have -misspelled it (e.g., `\hobx'), type `I' and the correct -spelling (e.g., `I\hbox'). Otherwise just continue, -and I'll forget about whatever was undefined. -[abc]{def} -|abc||def| -============================================================ -============================================================ -TEST 24: Same expandable command with/without defaults +TEST 22: Same expandable command with/without defaults ============================================================ |a|b|{c} |b|c| ============================================================ ============================================================ -TEST 25: Wrongly undefining an xparse command +TEST 23: Wrongly undefining an xparse command ============================================================ LaTeX3 Warning: The command '\foo' was undefined but not the associated (LaTeX3) commands '\foo code' and/or '\foo defaults'. Maybe you tried (LaTeX3) using \let. This may lead to an infinite loop. ============================================================ ============================================================ -TEST 26: NoValue passed to another command +TEST 24: NoValue passed to another command ============================================================ |-NoValue-|B|C| ============================================================ ============================================================ -TEST 27: Two processors +TEST 25: Two processors ============================================================ Defining \CountArg on line ... |2|{5}| ============================================================ ============================================================ -TEST 28: Non-character token delimiters +TEST 26: Non-character token delimiters ============================================================ abc def @@ -859,7 +775,7 @@ abc/-NoValue- -NoValue-/something ============================================================ ============================================================ -TEST 29: Non-character delimiters: delimiters with the same definition +TEST 27: Non-character delimiters: delimiters with the same definition ============================================================ (abc) (-NoValue-) @@ -879,7 +795,7 @@ Removed: (\){r}) (l|r) ============================================================ ============================================================ -TEST 30: Non-character delimiters: delimiters \let to the same token +TEST 28: Non-character delimiters: delimiters \let to the same token ============================================================ (abc) (-NoValue-) @@ -899,7 +815,7 @@ Removed: (\){r}) (l|r) ============================================================ ============================================================ -TEST 31: Non-character delimiters: forbidden delimiters +TEST 29: Non-character delimiters: forbidden delimiters ============================================================ ! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed. For immediate help type H . @@ -956,7 +872,7 @@ LaTeX will ignore this entire definition. (abc) ============================================================ ============================================================ -TEST 32: delimited commands in alignments +TEST 30: delimited commands in alignments ============================================================ A x y&z B x yXz @@ -965,7 +881,7 @@ D x yXz E x y&z ============================================================ ============================================================ -TEST 33: IfBoolean multi token +TEST 31: IfBoolean multi token ============================================================ ! Undefined control sequence. \LaTeX3 error: @@ -998,13 +914,13 @@ and I'll forget about whatever was undefined. FALSE ============================================================ ============================================================ -TEST 34: Processor spaces +TEST 32: Processor spaces ============================================================ |{a}{bcd}| > \box_wd:N \l_tmpa_box =0.0pt. ============================================================ ============================================================ -TEST 35: Processor depending on other argument +TEST 33: Processor depending on other argument ============================================================ |{a}{bcd;e}|1| |{a,bcd}{e}|1| diff --git a/base/testfiles-ltcmd/ltcmd005.lvt b/base/testfiles-ltcmd/ltcmd005.lvt index 470ff6725..75d6cc044 100644 --- a/base/testfiles-ltcmd/ltcmd005.lvt +++ b/base/testfiles-ltcmd/ltcmd005.lvt @@ -9,7 +9,7 @@ \ExplSyntaxOn \debug_on:n { check-declarations , deprecation , log-functions } \ExplSyntaxOff -\RequirePackage{xparse} +% \RequirePackage{xparse} \begin{document} @@ -20,7 +20,8 @@ \TEST { Invalid~'!' } { - \NewDocumentCommand { \testA } { ! u{.} } { } + % Disabled: test requires deprecated xparse.sty + % \NewDocumentCommand { \testA } { ! u{.} } { } \NewDocumentCommand { \testA } { ! o r() } { } \NewDocumentCommand { \testA } { ! + o m } { } \NewDocumentCommand { \testA } { ! ! o } { } @@ -119,7 +120,8 @@ \TEST { Invalid~signatures } { - \DeclareExpandableDocumentCommand { \testA } { u } { } { } + % Disabled: test requires deprecated xparse.sty + % \DeclareExpandableDocumentCommand { \testA } { u } { } { } \ProvideDocumentCommand { \testA } { O } { } \NewDocumentEnvironment { testA } { D [ ] } { } { } \NewDocumentEnvironment { testA } { ! + >{\TrimSpaces} } { } { } @@ -166,9 +168,10 @@ \NewExpandableDocumentCommand { \testA } { m o } { } \NewExpandableDocumentCommand { \testA } { +m m } { } \NewExpandableDocumentCommand { \testA } { v } { } - \NewExpandableDocumentCommand { \testA } { g } { } - \NewExpandableDocumentCommand { \testA } { o l } { } - \NewExpandableDocumentCommand { \testA } { o u { + } } { } + % Disabled: test requires deprecated xparse.sty + % \NewExpandableDocumentCommand { \testA } { g } { } + % \NewExpandableDocumentCommand { \testA } { o l } { } + % \NewExpandableDocumentCommand { \testA } { o u { + } } { } \NewExpandableDocumentCommand { \testA } { >{\TrimSpaces} m } { } } diff --git a/base/testfiles-ltcmd/ltcmd005.tlg b/base/testfiles-ltcmd/ltcmd005.tlg index 71ea533dc..3ab5ebb15 100644 --- a/base/testfiles-ltcmd/ltcmd005.tlg +++ b/base/testfiles-ltcmd/ltcmd005.tlg @@ -4,13 +4,6 @@ Author: Bruno Le Floch ============================================================ TEST 1: Invalid '!' ============================================================ -! LaTeX3 Error: Prefix '!' used before mandatory argument 'u{.}' of command -(LaTeX3) '\testA'. -For immediate help type H . - ... -l. ... } -The prefix '!' can only apply to trailing optional arguments. -LaTeX will ignore this entire definition. ! LaTeX3 Error: Prefix '!' used before mandatory argument 'R(){-NoValue-}' of (LaTeX3) command '\testA'. For immediate help type H . @@ -161,13 +154,6 @@ LaTeX will ignore this entire definition. ============================================================ TEST 6: Invalid signatures ============================================================ -! LaTeX3 Error: Bad argument specification 'u' for command '\testA'. -For immediate help type H . - ... -l. ... } -The argument specification provided was not valid: one or more mandatory -pieces of information were missing. -LaTeX will ignore this entire definition. ! LaTeX3 Error: Bad argument specification 'O' for command '\testA'. For immediate help type H . ... @@ -361,30 +347,6 @@ l. ... } The letter 'v' specifies an argument type which cannot be used in an expandable command. LaTeX will ignore this entire definition. -! LaTeX3 Error: Argument type 'G' not available for expandable command -(LaTeX3) '\testA'. -For immediate help type H . - ... -l. ... } -The letter 'G' specifies an argument type which cannot be used in an -expandable command. -LaTeX will ignore this entire definition. -! LaTeX3 Error: Argument type 'l' not available after optional argument for -(LaTeX3) expandable command '\testA'. -For immediate help type H . - ... -l. ... } -The letter 'l' specifies an argument type which cannot be used in an -expandable command after an optional argument. -LaTeX will ignore this entire definition. -! LaTeX3 Error: Argument type 'u' not available after optional argument for -(LaTeX3) expandable command '\testA'. -For immediate help type H . - ... -l. ... } -The letter 'u' specifies an argument type which cannot be used in an -expandable command after an optional argument. -LaTeX will ignore this entire definition. ! LaTeX3 Error: Argument processor '>{\TrimSpaces }' cannot be used for the (LaTeX3) expandable command '\testA'. For immediate help type H . diff --git a/base/testfiles-ltcmd/ltcmd006.tlg b/base/testfiles-ltcmd/ltcmd006.tlg index 1e90aa8f0..221b03285 100644 --- a/base/testfiles-ltcmd/ltcmd006.tlg +++ b/base/testfiles-ltcmd/ltcmd006.tlg @@ -4,7 +4,6 @@ Author: PhelypeOleinik ============================================================ TEST 1: Deprecated argument types ============================================================ -LaTeX3 Info: Defining command \testA with sig. 'G' on line .... ! LaTeX3 Error: Deprecated argument type 'G' for the command '\testA' requires (LaTeX3) xparse. For immediate help type H . @@ -13,7 +12,6 @@ l. ... } The letter 'G' specifies a known argument type that requires the xparse package. LaTeX will ignore this entire definition. -LaTeX3 Info: Defining command \testA with sig. 'g' on line .... ! LaTeX3 Error: Deprecated argument type 'g' for the command '\testA' requires (LaTeX3) xparse. For immediate help type H . @@ -22,7 +20,6 @@ l. ... } The letter 'g' specifies a known argument type that requires the xparse package. LaTeX will ignore this entire definition. -LaTeX3 Info: Defining command \testA with sig. 'l' on line .... ! LaTeX3 Error: Deprecated argument type 'l' for the command '\testA' requires (LaTeX3) xparse. For immediate help type H . @@ -31,7 +28,6 @@ l. ... } The letter 'l' specifies a known argument type that requires the xparse package. LaTeX will ignore this entire definition. -LaTeX3 Info: Defining command \testA with sig. 'u' on line .... ! LaTeX3 Error: Deprecated argument type 'u' for the command '\testA' requires (LaTeX3) xparse. For immediate help type H . @@ -44,4 +40,36 @@ LaTeX will ignore this entire definition. ============================================================ TEST 2: Deprecated argument types with xparse loaded ============================================================ +! LaTeX3 Error: Deprecated argument type 'G' for the command '\testA' requires +(LaTeX3) xparse. +For immediate help type H . + ... +l. ... } +The letter 'G' specifies a known argument type that requires the xparse +package. +LaTeX will ignore this entire definition. +! LaTeX3 Error: Deprecated argument type 'g' for the command '\testA' requires +(LaTeX3) xparse. +For immediate help type H . + ... +l. ... } +The letter 'g' specifies a known argument type that requires the xparse +package. +LaTeX will ignore this entire definition. +! LaTeX3 Error: Deprecated argument type 'l' for the command '\testA' requires +(LaTeX3) xparse. +For immediate help type H . + ... +l. ... } +The letter 'l' specifies a known argument type that requires the xparse +package. +LaTeX will ignore this entire definition. +! LaTeX3 Error: Deprecated argument type 'u' for the command '\testA' requires +(LaTeX3) xparse. +For immediate help type H . + ... +l. ... } +The letter 'u' specifies a known argument type that requires the xparse +package. +LaTeX will ignore this entire definition. ============================================================ diff --git a/base/testfiles-ltcmd/ltcmd007.lvt b/base/testfiles-ltcmd/ltcmd007.lvt index bd9f21c56..d420be2b9 100644 --- a/base/testfiles-ltcmd/ltcmd007.lvt +++ b/base/testfiles-ltcmd/ltcmd007.lvt @@ -7,12 +7,13 @@ \START % Emulating xparse loaded by the kernel -\ifdefined\NewDocumentCommand -\else - \IfFileExists{xparse.ltx} - {\input{xparse.ltx}} - {}% -\fi +% No longer needed: ltcmd loaded in the kernel +% \ifdefined\NewDocumentCommand +% \else +% \IfFileExists{xparse.ltx} +% {\input{xparse.ltx}} +% {}% +% \fi \OMIT diff --git a/base/testfiles-ltcmd/ltcmd007.tlg b/base/testfiles-ltcmd/ltcmd007.tlg index 37c67090f..c654e0f25 100644 --- a/base/testfiles-ltcmd/ltcmd007.tlg +++ b/base/testfiles-ltcmd/ltcmd007.tlg @@ -1,6 +1,6 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. -(xparse.sty +(../xparse.sty Package: xparse ....-..-.. L3 Experimental document command parser Defining \l__xparse_options_clist on line ... Defining \l__xparse_log_bool on line ... @@ -8,7 +8,7 @@ Defining key xparse/log-declarations on line ... Defining key xparse/log-declarations/unknown on line ... Defining key xparse/log-declarations/true on line ... Defining key xparse/log-declarations/false on line ... -(xparse-generic.tex) +(../xparse-generic.tex) Defining \__xparse_normalize_type_g:w on line ... Defining \__xparse_normalize_type_G:w on line ... Defining \__xparse_normalize_type_l:w on line ...