[latex3-commits] [l3svn] r6871 - Test 'runaway argument' error for non-long expandable commands

noreply at latex-project.org noreply at latex-project.org
Thu Feb 9 23:45:41 CET 2017


Author: bruno
Date: 2017-02-09 23:45:41 +0100 (Thu, 09 Feb 2017)
New Revision: 6871

Modified:
   trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg
   trunk/l3packages/xparse/testfiles/xparse004.lvt
   trunk/l3packages/xparse/testfiles/xparse004.tlg
Log:
Test 'runaway argument' error for non-long expandable commands


Modified: trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg	2017-02-09 22:21:38 UTC (rev 6870)
+++ trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg	2017-02-09 22:45:41 UTC (rev 6871)
@@ -1474,11 +1474,30 @@
 .................................................
 . LaTeX info: "xparse/define-command"
 . 
-. Defining command \foo with sig. 'O{\par }m' on line ....
+. Defining command \foo with sig. 'sO{\par }m' on line ....
 .................................................
 ============================================================
-TEST 18: par in default of short expandable
+TEST 18: par in short expandable
 ============================================================
-\foo {a}
-\foo [a]{b}
+Runaway argument?
+\ERROR 
+! Paragraph ended before \foo (arg 2) was complete.
+<to be read again> 
+\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?
+! Paragraph ended before \foo  was complete.
+<to be read again> 
+\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.
+|\BooleanFalse |\par |a|
+|\BooleanFalse |a|b|
+\par 
+\par 
 ============================================================

Modified: trunk/l3packages/xparse/testfiles/xparse004.lvt
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.lvt	2017-02-09 22:21:38 UTC (rev 6870)
+++ trunk/l3packages/xparse/testfiles/xparse004.lvt	2017-02-09 22:45:41 UTC (rev 6871)
@@ -331,11 +331,13 @@
     \foo ^{a}____ \foo _a_abc_ \foo *_a_
   }
 
-\DeclareDocumentCommand { \foo } { O{\par} m } { \TYPE { |#1|#2| } }
-\TESTEXP { par~in~default~of~short~expandable }
+\DeclareExpandableDocumentCommand { \foo } { s O{\par} m } { \TYPE { |#1|#2|#3| } }
+\TESTEXP { par~in~short~expandable }
   {
     \foo{a} \NEWLINE
     \foo[a]{b} \NEWLINE
+    \foo[\par \NEWLINE
+    \foo\par \NEWLINE
   }
 
 \END

Modified: trunk/l3packages/xparse/testfiles/xparse004.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.tlg	2017-02-09 22:21:38 UTC (rev 6870)
+++ trunk/l3packages/xparse/testfiles/xparse004.tlg	2017-02-09 22:45:41 UTC (rev 6871)
@@ -1474,11 +1474,30 @@
 .................................................
 . LaTeX info: "xparse/define-command"
 . 
-. Defining command \foo with sig. 'O{\par }m' on line ....
+. Defining command \foo with sig. 'sO{\par }m' on line ....
 .................................................
 ============================================================
-TEST 18: par in default of short expandable
+TEST 18: par in short expandable
 ============================================================
-\foo {a}
-\foo [a]{b}
+Runaway argument?
+\ERROR 
+! Paragraph ended before \foo (arg 2) was complete.
+<to be read again> 
+                   \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?
+! Paragraph ended before \foo  was complete.
+<to be read again> 
+                   \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.
+|\BooleanFalse |\par |a|
+|\BooleanFalse |a|b|
+\par 
+\par 
 ============================================================



More information about the latex3-commits mailing list