summaryrefslogtreecommitdiff
path: root/yarn.tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-23 09:27:14 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-23 09:27:14 +0100
commitc54bcf443bb1243d9cb14fef598b3901dd66f51e (patch)
tree91eae72a0b700fd632da5329e250a9afc461920e /yarn.tests
parentbec45232f5775bc934a638e3095ac77f78176708 (diff)
downloadcmdtest-c54bcf443bb1243d9cb14fef598b3901dd66f51e.tar.gz
Add warning when an input file has no scenario code blocks
Diffstat (limited to 'yarn.tests')
-rwxr-xr-xyarn.tests/warn-if-empty.script10
1 files changed, 10 insertions, 0 deletions
diff --git a/yarn.tests/warn-if-empty.script b/yarn.tests/warn-if-empty.script
new file mode 100755
index 0000000..7a5c028
--- /dev/null
+++ b/yarn.tests/warn-if-empty.script
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
+
+touch "$DATADIR/empty.yarn"
+
+# The grep below will fail unless the string exists, thereby failing the
+# entire test.
+./yarn --log=/dev/stdout "$DATADIR/empty.yarn" |
+ grep 'No scenario code blocks' > /dev/null