summaryrefslogtreecommitdiff
path: root/clab.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-17 14:06:10 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-17 15:53:21 +0300
commitf236aef565c1f9c99dcf24979830b232ab6749bc (patch)
tree0d1053ad8ef0b6f7de9a74485b641b81dd85c0c4 /clab.md
parente325fc5e47e5ef34969a30fc6568a58a6026f39b (diff)
downloadclab-f236aef565c1f9c99dcf24979830b232ab6749bc.tar.gz
rewrite in rust
Diffstat (limited to 'clab.md')
-rw-r--r--clab.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/clab.md b/clab.md
new file mode 100644
index 0000000..9b2bef4
--- /dev/null
+++ b/clab.md
@@ -0,0 +1,74 @@
+# Introduction
+
+`clab` is a command line address book application. It has no
+interactive features. This document collects its acceptance criteria.
+
+# Empty database
+
+~~~scenario
+given an installed clab
+when I run clab lint
+then command is successful
+
+when I run clab search Alice
+then command is successful
+then stdout is exactly ""
+~~~
+
+# Alice and Bob
+
+Next, let's add records for Alice and Bob, and make
+sure searches find only the right records.
+
+
+~~~scenario
+given an installed clab
+
+given file .local/share/clab/address-book.yaml from address-book.yaml
+
+when I run clab lint
+then command is successful
+
+when I run clab list
+then command is successful
+then stdout is valid YAML
+then stdout contains "Alice Atherthon"
+then stdout contains "Bob Bobbington"
+
+when I run clab search Alice
+then command is successful
+then stdout is valid YAML
+then stdout contains "Alice Atherthon"
+then stdout doesn't contain "Bob"
+
+when I run clab mutt-query Alice
+then command is successful
+then stdout contains "Alice Atherthon"
+then stdout contains "alice@example.com"
+then stdout doesn't contain "Bob"
+then stdout doesn't contain "bob@example.com"
+~~~
+
+~~~{#address-book.yaml .file .yaml}
+- name: Alice Atherthon
+ email:
+ work: alice@example.com
+- name: Bob Bobbington
+ email:
+ personal: bob@example.com
+~~~
+
+
+---
+title: "clab; &ndash; command line address book"
+author: Lars Wirzenius
+template: python
+bindings:
+- subplot/clab.yaml
+- subplot/vendor/files.yaml
+- subplot/vendor/runcmd.yaml
+functions:
+- subplot/clab.py
+- subplot/vendor/files.py
+- subplot/vendor/runcmd.py
+...