diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-07-06 09:22:44 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-07-06 13:55:58 +0100 |
commit | 2f3b41e6bf867ec7dd09cf8ae8bbc74db7a50029 (patch) | |
tree | 5acad6bc8ef221d959e70998e60a66cd5a350e51 /yarn.tests | |
parent | a6fb61972ccc6c790f2ec45f12eca770419b6e80 (diff) | |
download | cmdtest-2f3b41e6bf867ec7dd09cf8ae8bbc74db7a50029.tar.gz |
Implement --snapshot
Diffstat (limited to 'yarn.tests')
-rwxr-xr-x | yarn.tests/snapshot.script | 71 |
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" |