whatnow2 save metainformation in the draft itself
[mmh] / test / tests / whatnow2 / metafile
diff --git a/test/tests/whatnow2/metafile b/test/tests/whatnow2/metafile
new file mode 100644 (file)
index 0000000..e91cc79
--- /dev/null
@@ -0,0 +1,60 @@
+#test whatnow2 workflow
+
+. "$MH_TEST_COMMON"
+profile="$MMH/profile-send"
+cd "$MMH"
+cat "`mhparam profile`" - >"$profile" <<!
+default-from: Bob <bob@example.org>
+Metafile-Extension: .meta
+!
+cd - >/dev/null
+export MMHP="$profile"
+
+runandcheck "comp -editor cat -whatnowproc whatnow2" <<!
+To:
+Cc:
+Fcc: +sent
+Subject:
+--------
+!
+
+runandcheck "cat `mhpath l +drafts`.meta" <<!
+mmh-last-editor: cat
+mmh-mhdist: 0
+!
+
+runandcheck "whatnow2 edit" <<!
+To:
+Cc:
+Fcc: +sent
+Subject:
+--------
+!
+
+runandcheck "cat `mhpath l +drafts`.meta" <<!
+mmh-last-editor: cat
+mmh-mhdist: 0
+!
+
+cat >`mhpath l +drafts` <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test
+----------------
+foo
+!
+
+runandcheck 'whatnow2 send -debug | replace_contentid' <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-ID: <TESTID>
+
+foo
+----EOM----
+alice
+!