diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-07-04 08:23:11 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-07-04 08:23:11 +0100 |
commit | 7a64c59335d7d9cab18681bde5efef0be3542f08 (patch) | |
tree | 0fdb961050b76ab3f923e0b024a988c090bcb1d0 /yarn.1.in | |
parent | bb03f13aeb043d48c81ea996ce89480135ad81a1 (diff) | |
download | cmdtest-7a64c59335d7d9cab18681bde5efef0be3542f08.tar.gz |
Add FINALLY to manpage, plus fixes
Diffstat (limited to 'yarn.1.in')
-rw-r--r-- | yarn.1.in | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -42,11 +42,16 @@ GIVEN some live data in a directory AND an empty backup repository WHEN a backup is made THEN the data case be restored +FINALLY cleanup .fi .PP -(Note the addition of AND: you can have multiple GIVEN, WHEN, and +Note the addition of AND: you can have multiple GIVEN, WHEN, and THEN statements. The AND keyword makes the text be more readable. -SENCARIO is also necessary, and gives the title.) +SCENARIO is also necessary, and gives the title. +.PP +FINALLY is for cleanups. +The FINALLY steps will be run regardless of whether the scenario succeeds +or not. .PP Scenarios are meant to be written in somewhat human readable language. However, they are not free form text. @@ -72,9 +77,12 @@ IMPLEMENTS THEN the data can be restored mkdir "$TESTDIR/restored" restore-program -r "$TESTDIR/repo" "$TESTDIR/restored" diff -rq "$TESTDIR/data" "$TESTDIR/restored" +.IP +IMPLEMENTS FINALLY cleanup +echo nothing to do, actually .fi .PP -Each "IMPLEMENT GIVEN" (or WHEN, THEN) is followed by a regular +Each "IMPLEMENTS GIVEN" (or WHEN, THEN, FINALLY) is followed by a regular expression on the same line, and then a shell script that gets executed to implement any step that matches the regular expression. |