diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-06-16 14:57:55 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-06-16 19:30:22 +0300 |
commit | 80858ea67d85800089d7842fc66505fa83103aa0 (patch) | |
tree | 2c2143d38eed9f3b17ca87b05cbf9b755ed84665 /jt.yaml | |
parent | b28e50ac4cf013eb68f6d3a10b07f8683bd60122 (diff) | |
download | fable-poc-80858ea67d85800089d7842fc66505fa83103aa0.tar.gz |
Change: make generated test program more convenient
Also, the jt fable now works, against my locally modified version of
jt (soon to be pushed to git.liw.fi).
The generated program now has options --tempdir (default is something
in /tmp). If --tempdir is used, it doesn't removed at the end. Each
scenario gets a temporary directory created under the temporary
directory.
The generated program also has the options --log for specifying a log
file, and --scenario to specify which scenarios to run (use once per
scenario).
Diffstat (limited to 'jt.yaml')
-rw-r--r-- | jt.yaml | 55 |
1 files changed, 46 insertions, 9 deletions
@@ -1,10 +1,47 @@ -- given: a file (?P<filename>.+) -- when: I run (?P<cmd>jt .*) -- then: there is (?P<count>\d+) draft -- then: there is (?P<count>\d+) draft, with attachment (?P<filename>.+) -- then: there is (?P<count>\d+) journal entry -- then: there is (?P<count>\d+) journal entry, with attachment (?P<filename>.+) -- then: there is (?P<count>\d+) journal entry, belonging to (?P<id>.+) -- then: there is (?P<count>\d+) topic, (?P<id>.+), titled "(?P<title>.+)" +- given: a file (?P<filename>\S+) + function: create_empty_file + +- given: an empty journal + function: create_empty_journal + +- then: draft (?P<id>\d+) has title "(?P<title>.+)" + function: draft_has_title + +- then: it fails + function: jt_failed + +- then: there are (?P<count>\d+) drafts + function: n_drafts + - then: there are (?P<count>\d+) journal entries -- then: draft (?P<id>\d+) has title "(?P<title>.*)" + function: n_entries + +- then: there are no drafts + function: no_drafts + +- then: there are no journal entries + function: no_entries + +- then: there is 1 draft + function: one_draft + +- then: there is 1 draft, with attachment (?P<filename>\S+) + function: one_draft_with_attachment + +- then: there is 1 journal entry + function: one_entry + +- then: there is 1 journal entry, belonging to (?P<topic>\S+) + function: one_entry_on_topic + +- then: there is 1 journal entry, with attachment (?P<filename>\S+) + function: one_enry_with_attachment + +- then: there there is 1 topic, (?P<topic>\S+), titled "(?P<title>.+)" + function: one_topic + +- when: I run (?P<command>jt .*) + function: run_jt + +- when: I try to run (?P<command>jt .*) + function: try_jt |