test if aliasing work in spost
authorPhilipp Takacs <philipp@bureaucracy.de>
Sat, 31 Oct 2015 14:52:31 +0000 (15:52 +0100)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sat, 31 Oct 2015 16:27:56 +0000 (17:27 +0100)
test/tests/spost/test-alias [new file with mode: 0644]

diff --git a/test/tests/spost/test-alias b/test/tests/spost/test-alias
new file mode 100644 (file)
index 0000000..7705c6f
--- /dev/null
@@ -0,0 +1,42 @@
+# test spost: bcc and dcc headers
+
+. "$MH_TEST_COMMON"
+
+
+draft="$MH_TEST_DIR/spost-$$.draft"
+alias="$MH_TEST_DIR/spost-$$.alias"
+
+profile="$MMH/profile-spost"
+cd "$MMH"
+cat "`mhparam profile`" - >"$profile" <<!
+default-from: Bob <bob@example.org>
+Aliasfile: $alias
+!
+cd - >/dev/null
+export MMHP="$profile"
+
+cat > "$alias" <<!
+alice: Alice <alice@example.com>
+bob: Bob <bob@example.org>
+!
+# to + cc headers
+
+cat >"$draft" <<!
+From: bob
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test alias in to and from
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+From: Bob <bob@example.org>
+To: Alice <alice@example.com>
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: Test alias in to and from
+
+foo
+----EOM----
+alice@example.com
+!