summaryrefslogtreecommitdiff
path: root/yarn.tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-07-06 09:22:44 +0100
committerLars Wirzenius <liw@liw.fi>2013-07-06 13:55:58 +0100
commit2f3b41e6bf867ec7dd09cf8ae8bbc74db7a50029 (patch)
tree5acad6bc8ef221d959e70998e60a66cd5a350e51 /yarn.tests
parenta6fb61972ccc6c790f2ec45f12eca770419b6e80 (diff)
downloadcmdtest-2f3b41e6bf867ec7dd09cf8ae8bbc74db7a50029.tar.gz
Implement --snapshot
Diffstat (limited to 'yarn.tests')
-rwxr-xr-xyarn.tests/snapshot.script71
1 files changed, 46 insertions, 25 deletions
diff --git a/yarn.tests/snapshot.script b/yarn.tests/snapshot.script
index 90db93e..e8947ad 100755
--- a/yarn.tests/snapshot.script
+++ b/yarn.tests/snapshot.script
@@ -8,34 +8,55 @@ cat << EOF > "$DATADIR/foo.yarn"
WHEN foo
THEN foo
- IMPLEMENTS GIVEN foo
- touch "\$DATADIR/foo.given"
+ SCENARIO bar
+ GIVEN bar
+ WHEN bar
+ THEN bar
- IMPLEMENTS WHEN foo
- touch "\$DATADIR/foo.when"
+ IMPLEMENTS GIVEN (.*)
+ touch "\$DATADIR/\$MATCH_1.given"
- IMPLEMENTS THEN foo
- touch "\$DATADIR/foo.then"
+ IMPLEMENTS WHEN (.*)
+ touch "\$DATADIR/\$MATCH_1.when"
+
+ IMPLEMENTS THEN (.*)
+ touch "\$DATADIR/\$MATCH_1.then"
EOF
./yarn -q --snapshot --tempdir "$DATADIR/tmp" "$DATADIR/foo.yarn"
-test -e "$DATADIR/tmp/001-GIVEN-foo"
-test -e "$DATADIR/tmp/001-GIVEN-foo/foo.given"
-! test -e "$DATADIR/tmp/datadir/foo.when"
-! test -e "$DATADIR/tmp/datadir/foo.then"
-
-test -e "$DATADIR/tmp/002-WHEN-foo"
-test -e "$DATADIR/tmp/002-WHEN-foo/foo.given"
-test -e "$DATADIR/tmp/002-WHEN-foo/foo.when"
-! test -e "$DATADIR/tmp/002-WHEN-foo/foo.then"
-
-test -e "$DATADIR/tmp/003-THEN-foo"
-test -e "$DATADIR/tmp/003-THEN-foo/foo.given"
-test -e "$DATADIR/tmp/003-THEN-foo/foo.when"
-test -e "$DATADIR/tmp/003-THEN-foo/foo.then"
-
-test -e "$DATADIR/tmp/datadir"
-test -e "$DATADIR/tmp/datadir/foo.given"
-test -e "$DATADIR/tmp/datadir/foo.when"
-test -e "$DATADIR/tmp/datadir/foo.then"
+test -e "$DATADIR/tmp/bar"
+test -e "$DATADIR/tmp/bar/datadir"
+test -e "$DATADIR/tmp/bar/datadir/bar.given"
+test -e "$DATADIR/tmp/bar/datadir/bar.when"
+test -e "$DATADIR/tmp/bar/datadir/bar.then"
+
+test -e "$DATADIR/tmp/bar/001-GIVEN-bar"
+test -e "$DATADIR/tmp/bar/001-GIVEN-bar/bar.given"
+! test -e "$DATADIR/tmp/bar/001-GIVEN-bar/bar.when"
+! test -e "$DATADIR/tmp/bar/001-GIVEN-bar/bar.then"
+
+test -e "$DATADIR/tmp/bar/002-WHEN-bar"
+test -e "$DATADIR/tmp/bar/002-WHEN-bar/bar.given"
+test -e "$DATADIR/tmp/bar/002-WHEN-bar/bar.when"
+! test -e "$DATADIR/tmp/bar/002-WHEN-bar/bar.then"
+
+test -e "$DATADIR/tmp/bar/003-THEN-bar"
+test -e "$DATADIR/tmp/bar/003-THEN-bar/bar.given"
+test -e "$DATADIR/tmp/bar/003-THEN-bar/bar.when"
+test -e "$DATADIR/tmp/bar/003-THEN-bar/bar.then"
+
+test -e "$DATADIR/tmp/foo/001-GIVEN-foo"
+test -e "$DATADIR/tmp/foo/001-GIVEN-foo/foo.given"
+! test -e "$DATADIR/tmp/foo/001-GIVEN-foo/foo.when"
+! test -e "$DATADIR/tmp/foo/001-GIVEN-foo/foo.then"
+
+test -e "$DATADIR/tmp/foo/002-WHEN-foo"
+test -e "$DATADIR/tmp/foo/002-WHEN-foo/foo.given"
+test -e "$DATADIR/tmp/foo/002-WHEN-foo/foo.when"
+! test -e "$DATADIR/tmp/foo/002-WHEN-foo/foo.then"
+
+test -e "$DATADIR/tmp/foo/003-THEN-foo"
+test -e "$DATADIR/tmp/foo/003-THEN-foo/foo.given"
+test -e "$DATADIR/tmp/foo/003-THEN-foo/foo.when"
+test -e "$DATADIR/tmp/foo/003-THEN-foo/foo.then"