summaryrefslogtreecommitdiff
path: root/subplot/jt.yaml
blob: 6d10a3a5e78d861107527ad6a4e578671204fbe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
- given: "an executable script {filename}"
  function: create_script

- when: I invoke jt init (?P<dirname>\S+) (?P<journalname>\S+) "(?P<title>.*)"
  regex: true
  function: run_jt_init

- when: I invoke jt list-journals
  function: run_jt_list_journals

- when: I invoke jt is-journal {dirname}
  function: run_jt_is_journal

- when: I invoke jt new "{title:text}" --editor=none --dirname={dirname}
  function: run_jt_new

- when: "I invoke jt edit --editor={editor} --dirname={dirname}"
  regex: false
  function: run_jt_edit

- when: I invoke jt finish --dirname={dirname}
  function: run_jt_finish

- when: I edit draft {draftno} in {dirname} to also contain "{text}"
  function: edit_draft

- then: directory {dirname} exists
  function: is_directory

- then: output contains "(?P<pattern>.*)"
  regex: true
  function: output_contains

- then: there are no drafts in {dirname}
  function: journal_has_no_drafts

- then: there is one draft in {dirname}
  function: journal_has_one_draft

- then: draft {draftno} in {dirname} contains "{pattern:text}"
  function: draft_contains_string

- then: there are no journal entries in {dirname}
  function: journal_has_no_entries

- then: there is one journal entry in {dirname}, at {variable}
  function: journal_has_one_entry

- then: file <{variable}> contains "{pattern:text}"
  function: file_contains