mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
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).
This commit is contained in:
parent
f954b69251
commit
8dcd8b6987
1 changed files with 9 additions and 0 deletions
|
@ -304,6 +304,15 @@ cat <<EOF >EXPECTED
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file OUTPUT EXPECTED
|
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"
|
test_begin_subtest "notmuch search for non-existent message prints nothing"
|
||||||
notmuch search "no-message-matches-this" > OUTPUT
|
notmuch search "no-message-matches-this" > OUTPUT
|
||||||
echo -n >EXPECTED
|
echo -n >EXPECTED
|
||||||
|
|
Loading…
Reference in a new issue