From 65801835ee47dc4cada82c8a3ae16e8177a7919a Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 15 Nov 2012 14:49:52 -0500 Subject: test: Test buttonization of id: links This matches the current behavior of the buttonizer, so it passes, but many of these cases are not what you'd want (and some of them aren't even valid Xapian queries). The next patch will fix the handling of these cases and update the test. --- test/emacs-show | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'test/emacs-show') diff --git a/test/emacs-show b/test/emacs-show index 64c38d30..5d7151b5 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -106,5 +106,55 @@ test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir st (test-visible-output)' test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-indent-thread-content-off +test_begin_subtest "id buttonization" +add_message '[body]=" +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:2+2=5 +id:=_-:/.[]@$%+ +id:abc)def +id:ab\"c def +id:\"abc\"def +id:\"ab\"\"c\"def +id:\"ab c\"def +id:\"abc\".def +id:\"abc +\" +id:) +id: +cid:xxx"' +test_emacs '(notmuch-show "id:'$gen_msg_id'") + (notmuch-test-mark-links) + (test-visible-output)' +cat <EXPECTED +Notmuch Test Suite (2001-01-05) (inbox) +Subject: id buttonization +To: Notmuch Test Suite +Date: Fri, 05 Jan 2001 15:43:57 +0000 + +<> +<> <> <> <> +<> <> +(<> [<> +<> +<> +<> +<> +<>"c def +<>def +<>"c"def +id:"ab c"def +<>.def +id:"abc +" +<> +id: +c<> +EOF +test_expect_equal_file OUTPUT EXPECTED + test_done -- cgit v1.2.3