summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-10-28 15:09:47 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2015-10-30 18:54:37 +0100
commit7620a6c29292bd80f6d10491db351fe1c2644bf0 (patch)
treefabfcdc5eeddb9898d77de83e15e504dbe82cef2
parent25ba9b74ee5eeddf7cbc6a9c3d3770bbf9653d7f (diff)
downloadgitano-7620a6c29292bd80f6d10491db351fe1c2644bf0.tar.bz2
yarnlib: Allow empty "WHEN foo bar runs" commands
Rather than specialising a 0-ary version, it's less effort to make the existing implementation flexible enough.
-rw-r--r--testing/library.yarn4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index 89e8da1..3f57a26 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -81,10 +81,10 @@ Admin repo manipulation
Generic utility methods
-----------------------
- IMPLEMENTS WHEN ([a-z][a-z0-9]*) ([a-z][a-z0-9]*) runs (.+)
+ IMPLEMENTS WHEN ([a-z][a-z0-9]*) ([a-z][a-z0-9]*) runs ?(.*)
$GTT runcommand $MATCH_1 $MATCH_2 $MATCH_3 > $DATADIR/stdout 2> $DATADIR/stderr
- IMPLEMENTS WHEN ([a-z][a-z0-9]*) ([a-z][a-z0-9]*),? expecting failure,? runs (.+)
+ IMPLEMENTS WHEN ([a-z][a-z0-9]*) ([a-z][a-z0-9]*),? expecting failure,? runs ?(.*)
if $GTT runcommand $MATCH_1 $MATCH_2 $MATCH_3 > $DATADIR/stdout 2> $DATADIR/stderr; then
false
fi