aboutsummaryrefslogtreecommitdiff
path: root/test/search-output
diff options
context:
space:
mode:
authorFlorian Friesdorf <flo@chaoflow.net>2011-05-09 01:13:15 +0200
committerCarl Worth <cworth@cworth.org>2011-06-01 21:58:16 -0700
commit8dcd8b69874c0dcb09a5831e6082cb9098edc959 (patch)
treed6e9ab7dee17efe31163e7baf33249317198ceb6 /test/search-output
parentf954b692517237cb0d4779ca95002b2c896cc62d (diff)
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 <jrollins@finestructure.net> Edited-by: Carl Worth <cworth@cworth.org> 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).
Diffstat (limited to 'test/search-output')
-rwxr-xr-xtest/search-output9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/search-output b/test/search-output
index 13f9613..5658dce 100755
--- a/test/search-output
+++ b/test/search-output
@@ -304,6 +304,15 @@ cat <<EOF >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 <<EOF >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