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 68655431FC0
\r
6 for <notmuch@notmuchmail.org>; Tue, 3 Jul 2012 15:21:15 -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 TZ+qZ51EA9FW for <notmuch@notmuchmail.org>;
\r
16 Tue, 3 Jul 2012 15:21:11 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id A418E431FC9
\r
20 for <notmuch@notmuchmail.org>; Tue, 3 Jul 2012 15:21:06 -0700 (PDT)
\r
21 X-AuditID: 12074425-b7f9b6d0000008c4-5d-4ff370522f85
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id E9.1B.02244.25073FF4; Tue, 3 Jul 2012 18:21:06 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q63ML4NJ002763;
\r
27 Tue, 3 Jul 2012 18:21:05 -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 q63ML1ol023224
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Tue, 3 Jul 2012 18:21:02 -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 1SmBSv-0007fY-28; Tue, 03 Jul 2012 18:21:01 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 6/8] test: New test for incremental search output parsing
\r
40 Date: Tue, 3 Jul 2012 18:20:57 -0400
\r
41 Message-Id: <1341354059-29396-7-git-send-email-amdragon@mit.edu>
\r
42 X-Mailer: git-send-email 1.7.10
\r
43 In-Reply-To: <1341354059-29396-1-git-send-email-amdragon@mit.edu>
\r
44 References: <1341354059-29396-1-git-send-email-amdragon@mit.edu>
\r
45 X-Brightmail-Tracker:
\r
46 H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsUixCmqrRtU8NnfYNJCbosje2axWyw985/Z
\r
47 4vrNmcwWb1bOY3Vg8dg56y67x+GvC1k8nq26xezR9GMxawBLFJdNSmpOZllqkb5dAlfG6rPN
\r
48 7AWX+Cua+s+xNDB+5eli5OSQEDCRuLlwMhuELSZx4d56IJuLQ0hgH6PE7iUtUM56Romj9/Yy
\r
49 glQJCZxkkpjwmAMiMZdRonnaEXaQBJuAhsS2/cvBikQEpCV23p3NCmIzC+RKnG09DBYXFvCU
\r
50 eDVvOtg6FgFViWkr1oDFeQUcJB5umsQOcYa8xNP7fWA1nAKOEitunmWBWOwgse1DB+sERv4F
\r
51 jAyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30cjNL9FJTSjcxgkKO3UV1B+OEQ0qHGAU4GJV4
\r
52 eBMVPvsLsSaWFVfmHmKU5GBSEuW9kgcU4kvKT6nMSCzOiC8qzUktPsQowcGsJMK7Ogkox5uS
\r
53 WFmVWpQPk5LmYFES572RctNfSCA9sSQ1OzW1ILUIJivDwaEkwduaD9QoWJSanlqRlplTgpBm
\r
54 4uAEGc4DNHwZSA1vcUFibnFmOkT+FKOilDhvFUhCACSRUZoH1wtLCa8YxYFeEebtBKniAaYT
\r
55 uO5XQIOZgAbnLf4EMrgkESEl1cC4fPbLE54/WdmP+Ik1Nf/PmBRjbcu332mNvrSRsvjBRy9V
\r
56 fe/OXrCHIfe9cc3K6i1dE99OO6abyijtofWgwaKCseLxdwbuzxPNLn3+Ntes6+W572vWevv3
\r
57 7fjgnnlO/GnW3SnT0xoXZARqbTl6/FvFufadzZmzXz2S116V3rA886PQyyg2r38/lViKMxIN
\r
58 tZiLihMB6z4zE+QCAAA=
\r
59 Cc: tomi.ollila@iki.fi
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Tue, 03 Jul 2012 22:21:15 -0000
\r
74 This advises the search process filter to make it process one
\r
75 character at a time in order to test the pessimal case for incremental
\r
76 search output parsing.
\r
78 The text parser fails this test because it gets tricked into thinking
\r
79 a parenthetical remark in a subject is the tag list.
\r
81 test/emacs | 11 +++++++++++
\r
82 test/test-lib.el | 8 ++++++++
\r
83 2 files changed, 19 insertions(+)
\r
85 diff --git a/test/emacs b/test/emacs
\r
86 index e9f954c..293b12a 100755
\r
89 @@ -35,6 +35,17 @@ test_emacs '(notmuch-search "tag:inbox")
\r
91 test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
93 +test_begin_subtest "Incremental parsing of search results"
\r
94 +test_subtest_known_broken
\r
95 +test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
\r
96 + (ad-activate 'notmuch-search-process-filter)
\r
97 + (notmuch-search \"tag:inbox\")
\r
98 + (notmuch-test-wait)
\r
99 + (ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal)
\r
100 + (ad-activate 'notmuch-search-process-filter)
\r
102 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
104 test_begin_subtest "Navigation of notmuch-hello to search results"
\r
105 test_emacs '(notmuch-hello)
\r
106 (goto-char (point-min))
\r
107 diff --git a/test/test-lib.el b/test/test-lib.el
\r
108 index 6271da2..5dd6271 100644
\r
109 --- a/test/test-lib.el
\r
110 +++ b/test/test-lib.el
\r
111 @@ -89,6 +89,14 @@ nothing."
\r
112 (add-hook-counter 'notmuch-hello-mode-hook)
\r
113 (add-hook-counter 'notmuch-hello-refresh-hook)
\r
115 +(defadvice notmuch-search-process-filter (around pessimal activate disable)
\r
116 + "Feed notmuch-search-process-filter one character at a time."
\r
117 + (let ((string (ad-get-arg 1)))
\r
118 + (loop for char across string
\r
120 + (ad-set-arg 1 (char-to-string char))
\r
123 (defmacro notmuch-test-run (&rest body)
\r
124 "Evaluate a BODY of test expressions and output the result."
\r