From 332554c2b0ba2491260dde1cbd907a35e65d751f Mon Sep 17 00:00:00 2001 From: djcb Date: Tue, 12 Feb 2013 00:00:40 +0200 Subject: [PATCH] * mu: update unit test (after more eager address matching) --- lib/mu-store-write.cc | 3 ++- mu/tests/test-mu-query.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mu-store-write.cc b/lib/mu-store-write.cc index afa1f056..596f1811 100644 --- a/lib/mu-store-write.cc +++ b/lib/mu-store-write.cc @@ -645,7 +645,8 @@ each_contact_info (MuMsgContact *contact, MsgDoc *msgdoc) * freeing */ escaped = mu_str_xapian_escape (contact->address, FALSE, msgdoc->_strchunk); - msgdoc->_doc->add_term (pfx + escaped); + msgdoc->_doc->add_term + (std::string (pfx + escaped, 0, MuStore::MAX_TERM_LENGTH)); add_address_subfields (*msgdoc->_doc, contact->address, pfx, msgdoc->_strchunk); diff --git a/mu/tests/test-mu-query.c b/mu/tests/test-mu-query.c index 9e7d6e8b..661deed6 100644 --- a/mu/tests/test-mu-query.c +++ b/mu/tests/test-mu-query.c @@ -216,7 +216,7 @@ test_mu_query_03 (void) { "subject:Re: Learning LISP; Scheme vs elisp.", 0}, { "subject:\"Re: Learning LISP; Scheme vs elisp.\"", 1}, { "to:help-gnu-emacs@gnu.org", 4}, - { "t:help-gnu-emacs", 0}, + { "t:help-gnu-emacs", 4}, { "flag:flagged", 1} };