summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-07-25 21:49:13 +0300
committerLars Wirzenius <liw@liw.fi>2014-07-25 21:49:13 +0300
commit3223bf2f5a9068e9a685cee33b8272e573f18817 (patch)
tree18acbc3cf4ab34510caba36a503b1ec8c1a50059 /yarns
parent819f0cb22b5acce77ea8d4f9318da098e6097bee (diff)
downloaddistix-3223bf2f5a9068e9a685cee33b8272e573f18817.tar.gz
Add 'distix import-mbox'
Diffstat (limited to 'yarns')
-rw-r--r--yarns/080-import-mail.yarn17
1 files changed, 17 insertions, 0 deletions
diff --git a/yarns/080-import-mail.yarn b/yarns/080-import-mail.yarn
index 84c58f6..f947de2 100644
--- a/yarns/080-import-mail.yarn
+++ b/yarns/080-import-mail.yarn
@@ -24,3 +24,20 @@ will read the e-mail from its standard input.
AND user attempts to run distix list
THEN attempt succeeded
AND output matches "^[0-9a-f]{32} bar$"
+
+Next, import an mbox.
+
+ SCENARIO import mbox
+
+ WHEN user attempts to run distix init REPO
+ THEN attempt succeeded
+
+ GIVEN file MBOX containing "From foo@example.com Mon Mar 19 09:46:32 2012\nFrom: foo@example.com\nSubject: bar\n\nyo\n"
+ WHEN user attempts to run distix import-mbox REPO MBOX
+ THEN attempt succeeded
+ AND everything in REPO is committed to git
+
+ WHEN user changes working directory to REPO
+ AND user attempts to run distix list
+ THEN attempt succeeded
+ AND output matches "^[0-9a-f]{32} bar$"