Test if MIME creation works
authorPhilipp Takacs <philipp@bureaucracy.de>
Sat, 6 Aug 2016 16:08:58 +0000 (18:08 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sat, 6 Aug 2016 16:08:58 +0000 (18:08 +0200)
Test if send uses mhbuild only, if it is usefull. A message
already in MIME-Formate should not cause a fail.

test/tests/send/test-mimeify [new file with mode: 0644]

diff --git a/test/tests/send/test-mimeify b/test/tests/send/test-mimeify
new file mode 100644 (file)
index 0000000..96e2418
--- /dev/null
@@ -0,0 +1,62 @@
+#Test if MIME convertion work
+
+. "$MH_TEST_COMMON"
+
+draft="$MH_TEST_DIR/send-$$.draft"
+
+profile="$MMH/profile-send"
+cd "$MMH"
+cat "`mhparam profile`" - >"$profile" <<!
+default-from: Bob <bob@example.org>
+!
+cd - >/dev/null
+export MMHP="$profile"
+
+cat >"$draft" <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test MIME
+----------------
+foo
+!
+
+runandcheck 'send -debug "$draft" | sed "/^Content-ID/s/:.*/: <TESTID>/"' <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test MIME
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-ID: <TESTID>
+
+foo
+----EOM----
+alice
+!
+
+cat >"$draft" <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test MIME
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-ID: <TESTID>
+----------------
+foo
+!
+
+runandcheck 'send -debug "$draft"' <<!
+From: Bob <bob@example.org>
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test MIME
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-ID: <TESTID>
+
+foo
+----EOM----
+alice
+!