summaryrefslogtreecommitdiff
path: root/yarn.tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-07-04 08:24:08 +0100
committerLars Wirzenius <liw@liw.fi>2013-07-04 08:24:08 +0100
commit8ed4d0938be659cc1a618ee74a9882bdad83dd74 (patch)
tree63852a0d55aff881311f86dd8944c3af0c088ae0 /yarn.tests
parentfaff7b2b536218669216593068f063611cf80dab (diff)
parentd07601b82bed17db1bec8c0d65402ee3bf644b6c (diff)
downloadcmdtest-8ed4d0938be659cc1a618ee74a9882bdad83dd74.tar.gz
Merge branch 'finally'
Diffstat (limited to 'yarn.tests')
-rwxr-xr-xyarn.tests/finally.script26
1 files changed, 26 insertions, 0 deletions
diff --git a/yarn.tests/finally.script b/yarn.tests/finally.script
new file mode 100755
index 0000000..2d383a0
--- /dev/null
+++ b/yarn.tests/finally.script
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -eu
+
+cat <<EOF > "$DATADIR/finally.yarn"
+ SCENARIO finally
+ GIVEN nothing
+ WHEN nothing
+ THEN nothing
+ FINALLY yeehaa
+
+ IMPLEMENTS GIVEN nothing
+ true
+
+ IMPLEMENTS WHEN nothing
+ true
+
+ IMPLEMENTS THEN nothing
+ true
+
+ IMPLEMENTS FINALLY yeehaa
+ touch "$DATADIR/finally.has.run"
+EOF
+
+./yarn -q "$DATADIR/finally.yarn"
+test -e "$DATADIR/finally.has.run"