summaryrefslogtreecommitdiff
path: root/yarn.tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-23 08:55:58 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-23 08:55:58 +0100
commit5804dc6a1d4675af5b40a7a9eb4d74bc14f0f805 (patch)
tree9500849c8d20d33dfddfff37a318addf174b49f4 /yarn.tests
parentce118d6418eda1a41f5f2446ffc1ed833ba07dbb (diff)
downloadcmdtest-5804dc6a1d4675af5b40a7a9eb4d74bc14f0f805.tar.gz
Add test for yarn and multiple input files
Diffstat (limited to 'yarn.tests')
-rwxr-xr-xyarn.tests/multi.script23
-rw-r--r--yarn.tests/multi.stdout1
-rw-r--r--yarn.tests/simple.stderr4
3 files changed, 26 insertions, 2 deletions
diff --git a/yarn.tests/multi.script b/yarn.tests/multi.script
new file mode 100755
index 0000000..35818fa
--- /dev/null
+++ b/yarn.tests/multi.script
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -eu
+
+
+cat <<EOF > "$DATADIR/1.yarn"
+ SCENARIO foo
+ GIVEN all is ok
+ WHEN doing ok
+ THEN be ok
+EOF
+
+cat <<EOF > "$DATADIR/2.yarn"
+ IMPLEMENTS GIVEN all is ok
+ true
+ IMPLEMENTS WHEN doing ok
+ true
+ IMPLEMENTS THEN be ok
+ true
+EOF
+
+./yarn "$DATADIR/1.yarn" "$DATADIR/2.yarn" |
+sed 's/, in .* seconds$//'
diff --git a/yarn.tests/multi.stdout b/yarn.tests/multi.stdout
new file mode 100644
index 0000000..22c4303
--- /dev/null
+++ b/yarn.tests/multi.stdout
@@ -0,0 +1 @@
+Scenario test suite PASS, with 1 scenarios
diff --git a/yarn.tests/simple.stderr b/yarn.tests/simple.stderr
index db4fde4..3df1113 100644
--- a/yarn.tests/simple.stderr
+++ b/yarn.tests/simple.stderr
@@ -1,7 +1,7 @@
-ERROR: In story "a simple story"
+ERROR: In scenario "a simple scenario"
step "THEN not all is well" failed,
with exit code 1:
Standard output from shell command:
Standard error from shell command:
-ERROR: Test suite FAILED in 1 stories
+ERROR: Test suite FAILED in 1 scenarios