diff options
| author | David Bremner <david@tethera.net> | 2013-12-08 22:52:41 +0800 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2013-12-09 21:20:27 +0800 |
| commit | 72ff135ac3e79be548bf5b82b63d15ba278ef4ce (patch) | |
| tree | 1fae4b470a8f3e732212755e5f18e686ef13842e /test/emacs | |
| parent | 18921be2e9c0b15c7a4c053718470f667fd35b35 (diff) | |
test: sanitize dates in emacs, raw, and text output
add a new function notmuch_date_sanitize for rfc822-ish things. Add
date sanitization to notmuch_show_sanitize_all and use it more places.
This is all in aid of a transition to unique timestamps on messages.
Diffstat (limited to 'test/emacs')
| -rwxr-xr-x | test/emacs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -86,15 +86,16 @@ add_message "[subject]=\"message-with-invalid-from\"" \ "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\"" thread=$(notmuch search --output=threads subject:message-with-invalid-from) test_emacs "(notmuch-show \"$thread\") - (test-output)" + (test-output \"OUTPUT.raw\")" cat <<EOF >EXPECTED "Invalid " (2001-01-05) (inbox) Subject: message-with-invalid-from To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Fri, 05 Jan 2001 15:43:57 +0000 +Date: GENERATED_DATE This is just a test message (#1) EOF +notmuch_date_sanitize < OUTPUT.raw > OUTPUT test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "Navigation of notmuch-search to thread view" @@ -605,11 +606,11 @@ Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?"' test_emacs "(notmuch-show \"top-posting\") - (test-visible-output)" + (test-visible-output \"OUTPUT.raw\")" echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox) Subject: The problem with top-posting To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Fri, 05 Jan 2001 15:43:57 +0000 +Date: GENERATED_DATE A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? @@ -618,13 +619,14 @@ Q: What is the most annoying thing in e-mail? Top Poster <top@poster.com> (2001-01-05) (inbox unread) Subject: Re: The problem with top-posting To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Fri, 05 Jan 2001 15:43:57 +0000 +Date: GENERATED_DATE Thanks for the advice! I will be sure to put it to good use. -Top Poster [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED +notmuch_date_sanitize < OUTPUT.raw > OUTPUT test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "Hiding message in notmuch-show view" |
