summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-15 17:10:22 +0000
committerLars Wirzenius <liw@liw.fi>2021-09-15 17:10:22 +0000
commit794ea63e46212941e73ca3933d30431d43d469b3 (patch)
treeed10a6a15a1a276176b030a443e4ff36df04849f
parent88679dd39cc6803a803b48eb35d6d13bfc19da5e (diff)
parent4da2a60a5db498c9605497d8709b1a0ea5a92045 (diff)
downloadjt2-794ea63e46212941e73ca3933d30431d43d469b3.tar.gz
Merge branch 'fix' into 'main'
some cleanup and a subplot breaking change fix See merge request larswirzenius/jt!23
-rw-r--r--jt.md32
-rw-r--r--subplot/jt.yaml84
2 files changed, 79 insertions, 37 deletions
diff --git a/jt.md b/jt.md
index c32ea62..2066690 100644
--- a/jt.md
+++ b/jt.md
@@ -1,3 +1,19 @@
+---
+title: "jt&mdash;a journalling tool"
+author:
+- Lars Wirzenius
+- Daniel Silverstone
+template: python
+bindings:
+- subplot/jt.yaml
+- lib/files.yaml
+- lib/runcmd.yaml
+functions:
+- subplot/jt.py
+- lib/files.py
+- lib/runcmd.py
+...
+
# Introduction
The **jt** software (short for "journalling tool") is a helper for
@@ -317,19 +333,3 @@ typeset into HTML or PDF or to generate a program that automatically
verifies that all acceptance criteria are met.
[Subplot]: https://subplot.liw.fi/
-
----
-title: "jt&mdash;a journalling tool"
-author:
-- Lars Wirzenius
-- Daniel Silverstone
-template: python
-bindings:
-- subplot/jt.yaml
-- lib/files.yaml
-- lib/runcmd.yaml
-functions:
-- subplot/jt.py
-- lib/files.py
-- lib/runcmd.py
-...
diff --git a/subplot/jt.yaml b/subplot/jt.yaml
index dc2a666..90ca3ef 100644
--- a/subplot/jt.yaml
+++ b/subplot/jt.yaml
@@ -1,65 +1,107 @@
- given: "an installed jt"
- function: install_jt
+ impl:
+ python:
+ function: install_jt
- given: "an executable script {filename}"
- function: create_script
+ impl:
+ python:
+ function: create_script
- when: I invoke jt init (?P<dirname>\S+) (?P<journalname>\S+) "(?P<title>.*)"
regex: true
- function: run_jt_init
+ impl:
+ python:
+ function: run_jt_init
- when: I invoke jt list-journals
- function: run_jt_list_journals
+ impl:
+ python:
+ function: run_jt_list_journals
- when: I invoke jt is-journal {dirname}
- function: run_jt_is_journal
+ impl:
+ python:
+ function: run_jt_is_journal
- when: I invoke jt new "{title:text}" --editor=none --dirname={dirname}
- function: run_jt_new
+ impl:
+ python:
+ function: run_jt_new
- when: "I invoke jt edit --editor={editor} --dirname={dirname}"
regex: false
- function: run_jt_edit
+ impl:
+ python:
+ function: run_jt_edit
- when: I invoke jt finish --dirname={dirname}
- function: run_jt_finish
+ impl:
+ python:
+ function: run_jt_finish
- when: I edit draft {draftno} in {dirname} to also contain "{text}"
- function: edit_draft
+ impl:
+ python:
+ function: edit_draft
- then: output contains "(?P<pattern>.*)"
regex: true
- function: output_contains
+ impl:
+ python:
+ function: output_contains
- then: there are no drafts in {dirname}
- function: journal_has_no_drafts
+ impl:
+ python:
+ function: journal_has_no_drafts
- then: there is one draft in {dirname}
- function: journal_has_one_draft
+ impl:
+ python:
+ function: journal_has_one_draft
- then: there are two drafts in {dirname}
- function: journal_has_two_drafts
+ impl:
+ python:
+ function: journal_has_two_drafts
- then: draft {draftno} in {dirname} contains "{pattern:text}"
- function: draft_contains_string
+ impl:
+ python:
+ function: draft_contains_string
- then: draft {draftno} in {dirname} links to "{topic}"
- function: draft_links_to_topic
+ impl:
+ python:
+ function: draft_links_to_topic
- then: there are no journal entries in {dirname}
- function: journal_has_no_entries
+ impl:
+ python:
+ function: journal_has_no_entries
- then: there is one journal entry in {dirname}, at {variable}
- function: journal_has_one_entry
+ impl:
+ python:
+ function: journal_has_one_entry
- then: there are two journal entries in {dirname}, at {variable1} and {variable2}
- function: journal_has_two_entries
+ impl:
+ python:
+ function: journal_has_two_entries
- then: journal entry <{variable}> contains "{pattern:text}"
- function: file_contains
+ impl:
+ python:
+ function: file_contains
- then: file name <{varname}> ends with {suffix}
- function: file_name_has_suffix
+ impl:
+ python:
+ function: file_name_has_suffix
- then: there are no uncommitted changes in {dirname}
- function: git_is_clean
+ impl:
+ python:
+ function: git_is_clean