diff options
author | Carl Worth <cworth@cworth.org> | 2010-10-27 17:06:26 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-10-27 17:06:26 -0700 |
commit | 7123e63b00c2e47c70c07967c98fa1d97a1c5870 (patch) | |
tree | 03a88f974e0597cc9ac7aaf977ba8bcc72b77b5a | |
parent | 36dcbdeff6de2612e70fe58bdbc6c5b979b0eafa (diff) |
test: Use an explicit date in the message sent via (fake) SMTP
Simply setting an explicit date is cleaner than letting the current,
(arbitrary), date get generated for the email message and then constantly
filtering that date out of search results.
-rwxr-xr-x | test/emacs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -65,18 +65,17 @@ mkdir -p mail/sent/tmp ../smtp-dummy sent_message & smtp_dummy_pid=$! -test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it) (setq smtpmail-smtp-server \"localhost\") (setq smtpmail-smtp-service \"25025\") (notmuch-hello) (notmuch-mua-mail) (message-goto-to) (insert \"user@example.com\") (message-goto-subject) (insert \"Testing message sent via SMTP\") (message-goto-body) (insert \"This is a test that messages are sent via SMTP\") (message-send-and-exit)" >/dev/null 2>&1 +test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it) (setq smtpmail-smtp-server \"localhost\") (setq smtpmail-smtp-service \"25025\") (notmuch-hello) (notmuch-mua-mail) (message-goto-to) (insert \"user@example.com\nDate: Fri, 29 Mar 1974 10:00:00 -0000\") (message-goto-subject) (insert \"Testing message sent via SMTP\") (message-goto-body) (insert \"This is a test that messages are sent via SMTP\") (message-send-and-exit)" >/dev/null 2>&1 wait ${smtp_dummy_pid} output=$(sed \ -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \ - -e s',^Date:.*,Date: XXX,' \ -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message) test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org> To: user@example.com Subject: Testing message sent via SMTP +Date: Fri, 29 Mar 1974 10:00:00 -0000 User-Agent: Notmuch/XXX Emacs/XXX -Date: XXX Message-ID: <XXX> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii |