1 Return-Path: <amdragon@mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E0AA8431FBF
\r
6 for <notmuch@notmuchmail.org>; Thu, 5 Jul 2012 13:52:50 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id QDRa2rV-fFHc for <notmuch@notmuchmail.org>;
\r
16 Thu, 5 Jul 2012 13:52:48 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id CEB0B431FAE
\r
20 for <notmuch@notmuchmail.org>; Thu, 5 Jul 2012 13:52:43 -0700 (PDT)
\r
21 X-AuditID: 1209190c-b7f806d000006b87-9a-4ff5fe9ab89e
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id A6.9F.27527.A9EF5FF4; Thu, 5 Jul 2012 16:52:42 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q65KqgLK019980;
\r
27 Thu, 5 Jul 2012 16:52:42 -0400
\r
28 Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q65Kqb2Q027239
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 5 Jul 2012 16:52:39 -0400 (EDT)
\r
34 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1Smt2T-0004Xj-Kj; Thu, 05 Jul 2012 16:52:37 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v2 6/9] test: New test for incremental search output parsing
\r
40 Date: Thu, 5 Jul 2012 16:52:24 -0400
\r
41 Message-Id: <1341521547-15502-7-git-send-email-amdragon@mit.edu>
\r
42 X-Mailer: git-send-email 1.7.10
\r
43 In-Reply-To: <1341521547-15502-1-git-send-email-amdragon@mit.edu>
\r
44 References: <1341354059-29396-1-git-send-email-amdragon@mit.edu>
\r
45 <1341521547-15502-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixG6nrjvr31d/gxk71CxWz+WxuH5zJrPF
\r
48 m5XzWB2YPXbOusvucfjrQhaPZ6tuMQcwR3HZpKTmZJalFunbJXBlrD7bzF5wib+iqf8cSwPj
\r
49 V54uRg4OCQETiSlTEroYOYFMMYkL99azdTFycQgJ7GOUmH5+JiuEs55R4smKFiYI5ySTxIX5
\r
50 C6CcuYwSd3/uYAXpZxPQkNi2fzkjiC0iIC2x8+5ssDizQJzElin/weLCAj4SLy+tAIuzCKhK
\r
51 bH5wlRnE5hVwkGg78okR4g55iaf3+9hAbE4BR4kLExeDxYUEyiX+LPnHMoGRfwEjwypG2ZTc
\r
52 Kt3cxMyc4tRk3eLkxLy81CJdQ73czBK91JTSTYyg4OKU5NnB+Oag0iFGAQ5GJR5eo9wv/kKs
\r
53 iWXFlbmHGCU5mJREeRt/f/UX4kvKT6nMSCzOiC8qzUktPsQowcGsJMLbmwGU401JrKxKLcqH
\r
54 SUlzsCiJ815OuekvJJCeWJKanZpakFoEk5Xh4FCS4F35F6hRsCg1PbUiLTOnBCHNxMEJMpwH
\r
55 aPhakBre4oLE3OLMdIj8KUZFKXHemSAJAZBERmkeXC8s+l8xigO9Isy7HaSKB5g44LpfAQ1m
\r
56 Ahqct/gTyOCSRISUVAOjzPGpyj8e6y9RKJA8u33Tvqh/R9o93jAtc+r2EG05YWRy+H54xh7X
\r
57 zzxPDs/miti8zIL1W6Mh937Nxfc3NpatFjs8K7l5aujlrWdDVjjcmhmUPS/Y4sW5pOSYJ/vS
\r
58 HjKGc5h1TtPeys0XHTvH9cCk3UtmvXe58MRhv7sU38y5auLyHi9Xrf1bocRSnJFoqMVcVJwI
\r
60 Cc: tomi.ollila@iki.fi
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Thu, 05 Jul 2012 20:52:51 -0000
\r
75 This advises the search process filter to make it process one
\r
76 character at a time in order to test the pessimal case for incremental
\r
77 search output parsing.
\r
79 The text parser fails this test because it gets tricked into thinking
\r
80 a parenthetical remark in a subject is the tag list.
\r
82 test/emacs | 11 +++++++++++
\r
83 test/test-lib.el | 8 ++++++++
\r
84 2 files changed, 19 insertions(+)
\r
86 diff --git a/test/emacs b/test/emacs
\r
87 index e9f954c..293b12a 100755
\r
90 @@ -35,6 +35,17 @@ test_emacs '(notmuch-search "tag:inbox")
\r
92 test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
94 +test_begin_subtest "Incremental parsing of search results"
\r
95 +test_subtest_known_broken
\r
96 +test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
\r
97 + (ad-activate 'notmuch-search-process-filter)
\r
98 + (notmuch-search \"tag:inbox\")
\r
99 + (notmuch-test-wait)
\r
100 + (ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal)
\r
101 + (ad-activate 'notmuch-search-process-filter)
\r
103 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
105 test_begin_subtest "Navigation of notmuch-hello to search results"
\r
106 test_emacs '(notmuch-hello)
\r
107 (goto-char (point-min))
\r
108 diff --git a/test/test-lib.el b/test/test-lib.el
\r
109 index 6271da2..5dd6271 100644
\r
110 --- a/test/test-lib.el
\r
111 +++ b/test/test-lib.el
\r
112 @@ -89,6 +89,14 @@ nothing."
\r
113 (add-hook-counter 'notmuch-hello-mode-hook)
\r
114 (add-hook-counter 'notmuch-hello-refresh-hook)
\r
116 +(defadvice notmuch-search-process-filter (around pessimal activate disable)
\r
117 + "Feed notmuch-search-process-filter one character at a time."
\r
118 + (let ((string (ad-get-arg 1)))
\r
119 + (loop for char across string
\r
121 + (ad-set-arg 1 (char-to-string char))
\r
124 (defmacro notmuch-test-run (&rest body)
\r
125 "Evaluate a BODY of test expressions and output the result."
\r