summaryrefslogtreecommitdiff
path: root/jt.md
diff options
context:
space:
mode:
Diffstat (limited to 'jt.md')
-rw-r--r--jt.md62
1 files changed, 59 insertions, 3 deletions
diff --git a/jt.md b/jt.md
index dcd3c51..ad40b35 100644
--- a/jt.md
+++ b/jt.md
@@ -26,7 +26,7 @@ until it's finished.
$ jt --dirname ~/Journal init default "My private journal"
$ jt new --tag meta --tag journalling "My first journal entry"
... # text editor is opened so the new entry can be written
-$ jt finish
+$ jt finish 0 first-entry
~~~
@@ -157,11 +157,11 @@ and there is one draft in jrnl
and draft 0 in jrnl contains "Abracadabra"
given an executable script append.sh
-when I run jt2 --editor=./append.sh --dirname=jrnl edit
+when I run jt2 --editor=./append.sh --dirname=jrnl edit 0
then command is successful
and draft 0 in jrnl contains "Open sesame!"
-when I run jt2 --dirname=jrnl finish
+when I run jt2 --dirname=jrnl finish 0 abra
then command is successful
and there is one journal entry in jrnl, at FILE
and journal entry <FILE> contains "Abracadabra"
@@ -175,6 +175,62 @@ set -eux
echo "Open sesame!" >> "$1"
~~~
+## Create two drafts
+
+Verify that we can create two draft entries at the same time.
+
+~~~scenario
+given an installed jt
+
+when I run jt2 --dirname jrnl init default "My test journal"
+then command is successful
+then there are no drafts in jrnl
+then there are no journal entries in jrnl
+
+when I run jt2 --editor=none --dirname=jrnl new "Abracadabra"
+then command is successful
+then there is one draft in jrnl
+then draft 0 in jrnl contains "Abracadabra"
+
+when I run jt2 --editor=none --dirname=jrnl new "Simsalabim"
+then command is successful
+then there are two drafts in jrnl
+then draft 0 in jrnl contains "Abracadabra"
+then draft 1 in jrnl contains "Simsalabim"
+
+given an executable script append.sh
+when I run jt2 --editor=./append.sh --dirname=jrnl edit 0
+then draft 0 in jrnl contains "Open sesame!"
+when I run jt2 --editor=./append.sh --dirname=jrnl edit 1
+then draft 1 in jrnl contains "Open sesame!"
+
+when I run jt2 --dirname=jrnl finish 0 abra
+then command is successful
+then there is one journal entry in jrnl, at FILE
+then journal entry <FILE> contains "Abracadabra"
+then journal entry <FILE> contains "Open sesame!"
+then there is one draft in jrnl
+
+when I run jt2 --dirname=jrnl finish 1 sim
+then command is successful
+then there are two journal entries in jrnl, at FILE1 and FILE2
+then journal entry <FILE1> contains "Abracadabra"
+then journal entry <FILE2> contains "Simsalabim"
+then there are no drafts in jrnl
+~~~
+
+
+
+
+
+# Colophon
+
+This document is meant to be processed with the [Subplot][] program to
+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: