diff options
author | Austin Clements <amdragon@MIT.EDU> | 2012-11-15 14:49:53 -0500 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-11-15 18:11:07 -0400 |
commit | 580997252f80b765b208fcd9f4c696c061e2b9ad (patch) | |
tree | bbb27a04d87e32ee6ed8fd1e6e807428cf9e0d14 /test | |
parent | 65801835ee47dc4cada82c8a3ae16e8177a7919a (diff) |
emacs: Improve the regexp used to match id:'s in messages
This regexp agrees with Xapian query syntax much more closely, though
we specifically disallow various cases that would be confusing in the
context of an email body (e.g., punctuation at the end of an id: link
is not considered part of the id: link because it's probably part of
the surrounding text).
In particular, this handles id: links that are not surrounded by
quotes much better, which stash is much more likely to generate now
that we don't quote id's that don't need to be quoted. It also
handles quoted id: links better.
We update the buttonization test to reflect the new pattern.
Diffstat (limited to 'test')
-rwxr-xr-x | test/emacs-show | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/emacs-show b/test/emacs-show index 5d7151b5..e2d7c706 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -136,23 +136,23 @@ To: Notmuch Test Suite <test_suite@notmuchmail.org> Date: Fri, 05 Jan 2001 15:43:57 +0000 <<id:abc>> -<<id:abc.def.>> <<id:abc,def,>> <<id:abc;def;>> <<id:abc:def:>> -<<id:foo@bar.?baz?>> <<id:foo@bar!.baz!>> -(<<id:foo@bar.baz)>> [<<id:foo@bar.baz]>> -<<id:foo@bar.baz...>> +<<id:abc.def>>. <<id:abc,def>>, <<id:abc;def>>; <<id:abc:def>>: +<<id:foo@bar.?baz>>? <<id:foo@bar!.baz>>! +(<<id:foo@bar.baz>>) [<<id:foo@bar.baz>>] +<<id:foo@bar.baz>>... <<id:2+2=5>> <<id:=_-:/.[]@$%+>> -<<id:abc)def>> -<<id:ab>>"c def +<<id:abc>>)def +<<id:ab"c>> def <<id:"abc">>def -<<id:"ab">>"c"def -id:"ab c"def +<<id:"ab""c">>def +<<id:"ab c">>def <<id:"abc">>.def id:"abc " -<<id:)>> +id:) id: -c<<id:xxx>> +cid:xxx EOF test_expect_equal_file OUTPUT EXPECTED |