]> git.notmuchmail.org Git - notmuch/commitdiff
test: canonicalize content-type in "Sending a message via (fake) SMTP"
authorDavid Bremner <bremner@debian.org>
Thu, 30 Aug 2012 01:09:54 +0000 (22:09 -0300)
committerDavid Bremner <bremner@debian.org>
Thu, 30 Aug 2012 23:19:36 +0000 (20:19 -0300)
The version of message.el in emacs24 omits the charset=us-ascii,
causing the current version of this test to fail. With this patch, we
accept either option.  According to RFC 2046, they are semantically
equivalent.

test/emacs

index afe35bae09f26a8e938657575e8ff48672c4f685..5d118b67b4d347ae34242ba36cdc0051c2ebd799 100755 (executable)
@@ -169,7 +169,8 @@ emacs_deliver_message \
      (insert "To: user@example.com\n")'
 sed \
     -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \
-    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message >OUTPUT
+    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \
+    -e s',^\(Content-Type: text/plain\); charset=us-ascii$,\1,' < sent_message >OUTPUT
 cat <<EOF >EXPECTED
 From: Notmuch Test Suite <test_suite@notmuchmail.org>
 To: user@example.com
@@ -178,7 +179,7 @@ Date: 01 Jan 2000 12:00:00 -0000
 User-Agent: Notmuch/XXX Emacs/XXX
 Message-ID: <XXX>
 MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
+Content-Type: text/plain
 
 This is a test that messages are sent via SMTP
 EOF