[latex3-commits] [l3svn] r6308 - Trailing optional not detected after r-type argument

noreply at latex-project.org noreply at latex-project.org
Sun Nov 22 17:46:25 CET 2015


Author: bruno
Date: 2015-11-22 17:46:25 +0100 (Sun, 22 Nov 2015)
New Revision: 6308

Modified:
   trunk/l3packages/xparse/testfiles/xparse001.lvt
   trunk/l3packages/xparse/testfiles/xparse001.tlg
Log:
Trailing optional not detected after r-type argument

This commits adds a test showing the bug: normally expandable
commands cannot end with an optional argument.  Next commit fixes it.


Modified: trunk/l3packages/xparse/testfiles/xparse001.lvt
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse001.lvt	2015-11-22 16:23:27 UTC (rev 6307)
+++ trunk/l3packages/xparse/testfiles/xparse001.lvt	2015-11-22 16:46:25 UTC (rev 6308)
@@ -207,6 +207,8 @@
   \xparse_show:N \foo
   \DeclareExpandableDocumentCommand \foo { o +m } { (#1) (#2) }
   \xparse_show:N \foo
+  \DeclareExpandableDocumentCommand \foo { r() o } { (#1) (#2) }
+  \xparse_show:N \foo
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/l3packages/xparse/testfiles/xparse001.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse001.tlg	2015-11-22 16:23:27 UTC (rev 6307)
+++ trunk/l3packages/xparse/testfiles/xparse001.tlg	2015-11-22 16:46:25 UTC (rev 6308)
@@ -917,6 +917,19 @@
 > \foo code=\long macro:#1#2->(#1)(#2).
 <recently read> }
 l. ...}
+.................................................
+. LaTeX info: "xparse/redefine-command"
+. 
+. Redefining command \foo with sig. 'r()o' on line ....
+.................................................
+> \foo=macro:->\__xparse_expandable_grab_R:w \foo (arg 1)
+(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2)
+[]{-NoValue-}\__xparse_grab_expandable_end:wN \foo code \q__xparse \foo  .
+<recently read> }
+l. ...}
+> \foo code=\long macro:#1#2->(#1)(#2).
+<recently read> }
+l. ...}
 ============================================================
 ============================================================
 TEST 12: Checking for existing environments



More information about the latex3-commits mailing list