X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT080-search.sh;h=5e8b20ce1657869d6a9d6c1d0039f3764f48d575;hp=b63bf023de4cdae9d39991a3e49742d3c1fcfe6d;hb=60ac94fe58635f9c40724afa0f35965fc9ff1afc;hpb=44327ca86d8e3563490801f57a2d1ca455d9588e diff --git a/test/T080-search.sh b/test/T080-search.sh index b63bf023..5e8b20ce 100755 --- a/test/T080-search.sh +++ b/test/T080-search.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description='"notmuch search" in several variations' -. ./test-lib.sh +. ./test-lib.sh || exit 1 add_email_corpus @@ -145,4 +145,42 @@ add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12 output=$(notmuch search "bödý" | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)" + +cat < ${MAIL_DIR}/termpos +From: Source +To: Dest +Subject: part overlap test +Date: Sat, 01 January 2000 00:00:00 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="==-==" + +--==-== +Content-Type: text/plain + +a b c + +--==-== +Content-Type: text/plain + +x y z + +--==-==-- +EOF +notmuch new > /dev/null + +test_begin_subtest "headers do not have adjacent term positions" +# Regression test for a bug where term positions for non-prefixed +# terms weren't updated +output=$(notmuch search id:termpos and '"com dest"') +test_expect_equal "$output" "" + +test_begin_subtest "parts have non-overlapping term positions" +output=$(notmuch search id:termpos and '"a y c"') +test_expect_equal "$output" "" + +test_begin_subtest "parts do not have adjacent term positions" +output=$(notmuch search id:termpos and '"c x"') +test_expect_equal "$output" "" + test_done