diff options
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. |