From: Florian Friesdorf Date: Sun, 8 May 2011 23:13:15 +0000 (+0200) Subject: test: add test for sanitized notmuch-search output X-Git-Tag: debian/0.6_254~65 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=8dcd8b69874c0dcb09a5831e6082cb9098edc959;hp=f954b692517237cb0d4779ca95002b2c896cc62d;ds=sidebyside test: add test for sanitized notmuch-search output This feature was recently added, so it of course needs a test now. Signed-off-by: Jameson Graef Rollins Edited-by: Carl Worth Fixed test to use notmuch_search_sanitize in order to be robust against unpredictable thread ID numbers, (due to unpredictable order in which the filesystem presents files). --- diff --git a/test/search-output b/test/search-output index 13f96130..5658dcee 100755 --- a/test/search-output +++ b/test/search-output @@ -304,6 +304,15 @@ cat <EXPECTED EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "santize output for quoted-printable line-breaks in author and subject" +add_message "[subject]='two =?ISO-8859-1?Q?line=0A_subject?= + headers'" +notmuch search id:"$gen_msg_id" | notmuch_search_sanitize >OUTPUT +cat <EXPECTED +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; two line? subject headers (inbox unread) +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "notmuch search for non-existent message prints nothing" notmuch search "no-message-matches-this" > OUTPUT echo -n >EXPECTED