[PATCH] test: canonicalize content-type in "Sending a message via (fake) SMTP"

Austin Clements amdragon at MIT.EDU
Thu Aug 30 20:49:50 PDT 2012


LGTM.

Quoth david at tethera.net on Aug 30 at  8:24 pm:
> From: David Bremner <bremner at debian.org>
> 
> 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.
> ---
> 
> as discussed on IRC, the $ is not quite as nice as \b, but it is
> POSIX.2, at least according to "man 7 regex"
> 
>  test/emacs |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/test/emacs b/test/emacs
> index afe35ba..5d118b6 100755
> --- a/test/emacs
> +++ b/test/emacs
> @@ -169,7 +169,8 @@ emacs_deliver_message \
>       (insert "To: user at 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 at notmuchmail.org>
>  To: user at 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


More information about the notmuch mailing list