summaryrefslogtreecommitdiff
path: root/testing/library.yarn
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2013-06-22 15:45:09 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2013-06-22 15:45:09 +0100
commit1630874880c9bf9c67a4be1b3783a5bf5778e06b (patch)
tree8114d415a0a043822cdec7b44b8d5bfd6e057f6a /testing/library.yarn
parentb3b452ced0628134762b2214c2e7f324294dfef7 (diff)
downloadgitano-1630874880c9bf9c67a4be1b3783a5bf5778e06b.tar.gz
Support testing of 'as'
Diffstat (limited to 'testing/library.yarn')
-rw-r--r--testing/library.yarn14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index 2f4c4e1..c49021e 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -76,15 +76,29 @@ Generic utility methods
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 (.+)
+ if $GTT runcommand $MATCH_1 $MATCH_2 $MATCH_3 > $DATADIR/stdout 2> $DATADIR/stderr; then
+ false
+ fi
+
IMPLEMENTS THEN ([^ ]+) contains (.+)
grep -q "$MATCH_2" $DATADIR/"$MATCH_1"
IMPLEMENTS THEN ([^ ]+) does not contain (.+)
if grep -q "$MATCH_2" $DATADIR/"$MATCH_1"; then false; else true; fi
+ IMPLEMENTS THEN ([^ ]+) is empty
+ if grep -q . $DATADIR/"$MATCH_1"; then false; fi
+
IMPLEMENTS THEN failure ensues
cd $DATADIR
+ echo "FIND:"
find .
+ echo "KEYS:"
cat user-home-testinstance/.ssh/authorized_keys
+ echo "OUT":
+ cat stdout
+ echo "ERR":
+ cat stderr
/bin/false