aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2014-06-15 22:40:32 -0400
committerGravatar David Bremner <david@tethera.net>2014-06-18 17:55:14 -0300
commit44327ca86d8e3563490801f57a2d1ca455d9588e (patch)
tree2e8d4da95db1592eca7cec2f5d90140fb7df3652 /test
parentb547830783ee0732696d5c05a00cfc57baba065f (diff)
lib: Index name and address of from/to headers as a phrase
Previously, we indexed the name and address parts of from/to headers with two calls to _notmuch_message_gen_terms. In general, this indicates that these parts are separate phrases. However, because of an implementation quirk, the two calls to _notmuch_message_gen_terms generated adjacent term positions for the prefixed terms, which happens to be the right thing to do in this case, but the wrong thing to do for all other calls. Furthermore, _notmuch_message_gen_terms produced potentially overlapping term positions for the un-prefixed copies of the terms, which is simply wrong. This change indexes both the name and address in a single call to _notmuch_message_gen_terms, indicating that they should be part of a single phrase. This masks the problem with the un-prefixed terms (fixing the two known-broken tests) and puts us in a position to fix the unintentionally phrases generated by other calls to _notmuch_message_gen_terms.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T080-search.sh2
1 files changed, 0 insertions, 2 deletions
diff --git a/test/T080-search.sh b/test/T080-search.sh
index 8ed57013..b63bf023 100755
--- a/test/T080-search.sh
+++ b/test/T080-search.sh
@@ -67,7 +67,6 @@ output=$(notmuch search 'from:"Search By From Name <test@example.com>"' | notmuc
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"
test_begin_subtest "Search by from: without prefix (name and address)"
-test_subtest_known_broken
output=$(notmuch search '"Search By From Name <test@example.com>"' | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"
@@ -86,7 +85,6 @@ output=$(notmuch search 'to:"Search By To Name <test@example.com>"' | notmuch_se
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
test_begin_subtest "Search by to: without prefix (name and adress)"
-test_subtest_known_broken
output=$(notmuch search '"Search By To Name <test@example.com>"' | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"