summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-09 12:19:41 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-09 12:19:41 +0100
commitac99a37f80f1fac8c2c15c920938e729499b4d1e (patch)
tree62ba54d36d9e9c69da5d9fadb38bdfe57a080188
parent0896fe0fcc405edd74da12c2f21ee66632230c57 (diff)
downloadcmdtest-ac99a37f80f1fac8c2c15c920938e729499b4d1e.tar.gz
Add cmdtest for yarn
-rw-r--r--simple.story32
-rwxr-xr-xyarn.tests/simple.script5
2 files changed, 37 insertions, 0 deletions
diff --git a/simple.story b/simple.story
new file mode 100644
index 0000000..995318c
--- /dev/null
+++ b/simple.story
@@ -0,0 +1,32 @@
+A simple story test
+===================
+
+This is a very simple story test, which exists only to test
+the story test runner itself.
+
+ STORY a simple story
+
+The following is the actual test in this story:
+
+ GIVEN a clean slate
+ WHEN nothing happens
+ THEN everything is OK
+ AND not all is well
+ FINALLY cleanup
+
+And the implementations follow.
+
+ IMPLEMENTS GIVEN a clean slate
+ echo a clean slate!
+
+ IMPLEMENTS WHEN nothing happens
+ true
+
+ IMPLEMENTS THEN everything is OK
+ echo OK!
+
+ IMPLEMENTS THEN not all is well
+ false
+
+ IMPLEMENTS FINALLY cleanup
+ echo cleaning up
diff --git a/yarn.tests/simple.script b/yarn.tests/simple.script
new file mode 100755
index 0000000..83714f9
--- /dev/null
+++ b/yarn.tests/simple.script
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -eu
+
+./yarn simple.story