From c4cbaf65ea8dff900b98b1a7a7f3d71cb0b19c41 Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Mon, 11 Nov 2013 18:14:01 +0000 Subject: Given one invalid yarn and one valid one, check yarn reports the correct one as invalid --- yarn.tests/two-no-thens.exit | 1 + yarn.tests/two-no-thens.script | 23 +++++++++++++++++++++++ yarn.tests/two-no-thens.stderr | 3 +++ 3 files changed, 27 insertions(+) create mode 100755 yarn.tests/two-no-thens.exit create mode 100755 yarn.tests/two-no-thens.script create mode 100755 yarn.tests/two-no-thens.stderr diff --git a/yarn.tests/two-no-thens.exit b/yarn.tests/two-no-thens.exit new file mode 100755 index 0000000..d00491f --- /dev/null +++ b/yarn.tests/two-no-thens.exit @@ -0,0 +1 @@ +1 diff --git a/yarn.tests/two-no-thens.script b/yarn.tests/two-no-thens.script new file mode 100755 index 0000000..a6a67fd --- /dev/null +++ b/yarn.tests/two-no-thens.script @@ -0,0 +1,23 @@ +#!/bin/sh + +set -eu + + +cat < "$DATADIR/1.yarn" + SCENARIO valid scenario + GIVEN statement 1 + THEN statement 2 + + SCENARIO invalid scenario + GIVEN statement 1 + + IMPLEMENTS GIVEN statement (\d) + true + + IMPLEMENTS THEN statement (\d) + true + + +EOF + +./run-yarn "$DATADIR/1.yarn" diff --git a/yarn.tests/two-no-thens.stderr b/yarn.tests/two-no-thens.stderr new file mode 100755 index 0000000..4599b30 --- /dev/null +++ b/yarn.tests/two-no-thens.stderr @@ -0,0 +1,3 @@ +ERROR: Some scenarios have no THENs: + "invalid scenario" + -- cgit v1.2.1