DCC contains invisible (not visible) recipients
[mmh] / test / tests / spost / test-bcc-dcc
diff --git a/test/tests/spost/test-bcc-dcc b/test/tests/spost/test-bcc-dcc
new file mode 100644 (file)
index 0000000..cafddaf
--- /dev/null
@@ -0,0 +1,145 @@
+# test spost: bcc and dcc headers
+
+. "$MH_TEST_COMMON"
+
+
+draft="$MH_TEST_DIR/spost-$$.draft"
+
+profile="$MMH/profile-spost"
+cd "$MMH"
+cat "`mhparam profile`" - >"$profile" <<!
+default-from: Bob <bob@example.org>
+!
+cd -
+export MMHP="$profile"
+
+
+# to + cc headers
+
+cat >"$draft" <<!
+To: alice, gill
+Cc: jack, charly
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and cc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice, gill
+Cc: jack, charly
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and cc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+jack
+charly
+alice
+gill
+!
+
+
+
+# to + bcc headers
+
+cat >"$draft" <<!
+To: alice
+Bcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and bcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and bcc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+alice
+!
+
+
+
+
+
+# only bcc headers
+
+cat >"$draft" <<!
+Bcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only bcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only bcc
+From: Bob <bob@example.org>
+Bcc: undisclosed-recipients:;
+
+foo
+----EOM----
+!
+
+
+
+
+# to + dcc headers
+
+cat >"$draft" <<!
+To: alice
+Dcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and dcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and dcc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+john
+paul
+george
+ringo
+alice
+!
+
+
+
+# only dcc headers
+
+cat >"$draft" <<!
+Dcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only dcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only dcc
+From: Bob <bob@example.org>
+Bcc: undisclosed-recipients:;
+
+foo
+----EOM----
+john
+paul
+george
+ringo
+!
+