[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 4c / 5333e3a6384545553d7ea4237cbaaad6121d27
1 Return-Path: <damien.cassou@gmail.com>\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 78911431FB6\r
6         for <notmuch@notmuchmail.org>; Mon, 10 Dec 2012 06:33:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id rDqjQf32RBsR for <notmuch@notmuchmail.org>;\r
17         Mon, 10 Dec 2012 06:33:07 -0800 (PST)\r
18 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com\r
19  [74.125.82.47])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  2382E431FBD    for <notmuch@notmuchmail.org>; Mon, 10 Dec 2012 06:33:04 -0800\r
22  (PST)\r
23 Received: by mail-wg0-f47.google.com with SMTP id dq11so1542058wgb.2\r
24         for <notmuch@notmuchmail.org>; Mon, 10 Dec 2012 06:33:02 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=FjOPnjxam9eekRwg6h3Sr0akBYXL/OA/Zr+XVCAXZBs=;\r
28         b=rKH2cY+s4o4E7Rso0VIfXu0LYf+VzalFsleWCofDp0ioWsuf6Kml+5O6vuYY3UDcDa\r
29         E8xlOJIGw7UNeXI5vHWCYLLQ/rXRDkwOhk5AJoV0BfcifCTQ2GsrTsObeO0LmHQ7mcJp\r
30         pJAmc43RNnlk7oAEH//hZMdObBlfYfMswvsGPeLYN6lCn20/rQ+XEl8IQ5yaAnN/2Nf4\r
31         +/3JnrO7W38VhCU6tLPFNPxq5uEtF7IThXDN5lw1TWRUwRNIVVvEqhQJqai0y06UJeUX\r
32         xW+TG3tx+AMdvomOexFf0Z3Hb9Nu03KnZaspwLq6jsVibqnh1k/VSSNnTO9IztfKXot1\r
33         ZU9g==\r
34 Received: by 10.216.141.86 with SMTP id f64mr5159071wej.38.1355149982851;\r
35         Mon, 10 Dec 2012 06:33:02 -0800 (PST)\r
36 Received: from luz3.lille.inria.fr ([193.51.236.232])\r
37         by mx.google.com with ESMTPS id i6sm10241253wix.5.2012.12.10.06.33.01\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Mon, 10 Dec 2012 06:33:02 -0800 (PST)\r
40 From: Damien Cassou <damien.cassou@gmail.com>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH 4/4] emacs: Add unit-tests for clickable tags\r
43 Date: Mon, 10 Dec 2012 15:32:44 +0100\r
44 Message-Id: <1355149964-27905-5-git-send-email-damien.cassou@gmail.com>\r
45 X-Mailer: git-send-email 1.7.10.4\r
46 In-Reply-To: <1355149964-27905-1-git-send-email-damien.cassou@gmail.com>\r
47 References: <1355149964-27905-1-git-send-email-damien.cassou@gmail.com>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Mon, 10 Dec 2012 14:33:09 -0000\r
61 \r
62 Signed-off-by: Damien Cassou <damien.cassou@gmail.com>\r
63 ---\r
64  test/emacs |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
65  1 file changed, 62 insertions(+)\r
66 \r
67 diff --git a/test/emacs b/test/emacs\r
68 index 4e941bb..115f7d5 100755\r
69 --- a/test/emacs\r
70 +++ b/test/emacs\r
71 @@ -840,5 +840,67 @@ test_emacs "(let ((mm-text-html-renderer\r
72  test_expect_success "Rendering HTML mail with images" \\r
73      'cat OUTPUT && grep -q smiley OUTPUT'\r
74  \r
75 +test_begin_subtest "Extracting all tags from a thread"\r
76 +add_message \\r
77 +    '[subject]="Extracting all tags from a thread"' \\r
78 +    '[body]="body 1"'\r
79 +parent=${gen_msg_id}\r
80 +add_message \\r
81 +    '[subject]="Extracting all tags from a thread"' \\r
82 +    '[body]="body 2"' \\r
83 +    "[in-reply-to]=\<$parent\>"\r
84 +add_message \\r
85 +    '[subject]="Extracting all tags from a thread"' \\r
86 +    '[body]="body 3"' \\r
87 +    "[in-reply-to]=\<$parent\>"\r
88 +latest=${gen_msg_id}\r
89 +# Extract the thread-id from one of the emails\r
90 +thread_id=$(notmuch search --output=threads id:${latest})\r
91 +echo THREAD ID: '"'$thread_id'"'\r
92 +# Add tag "mytagfoo" to one of the emails\r
93 +notmuch tag +mytagfoo id:${latest}\r
94 +test_emacs_expect_t \\r
95 +    "(notmuch-show \"${thread_id}\")\r
96 +     (let ((output (notmuch-show-thread-tags))\r
97 +           (expected '(\"inbox\" \"mytagfoo\" \"unread\")))\r
98 +      (notmuch-test-expect-equal\r
99 +         (sort output #'string<)\r
100 +         (sort expected #'string<)))"\r
101 +\r
102 +test_begin_subtest "The tags appear in the header-line of notmuch-show"\r
103 +add_message \\r
104 +    '[subject]="foo bar"' \\r
105 +    '[body]="body 1"'\r
106 +parent=${gen_msg_id}\r
107 +# Add tag "mytagfoo" to one of the emails\r
108 +notmuch tag +mytagfoo id:${parent}\r
109 +# Extract the thread-id from one of the emails\r
110 +thread_id=$(notmuch search --output=threads id:${latest})\r
111 +test_emacs_expect_t \\r
112 +    "(notmuch-show \"${thread_id}\")\r
113 +     (if (string-match-p \"mytagfoo\" (format-mode-line header-line-format))\r
114 +         t\r
115 +       \"The tag mytagfoo was not in the header-line-format\")"\r
116 +\r
117 +test_begin_subtest "The tags of notmuch-show emails are clickable"\r
118 +add_message \\r
119 +    '[subject]="foo bar"' \\r
120 +    '[body]="body 1"'\r
121 +parent=${gen_msg_id}\r
122 +# Add tag "mytagfoo" to one of the emails\r
123 +notmuch tag +mytagfoo id:${parent}\r
124 +# Extract the thread-id from one of the emails\r
125 +thread_id=$(notmuch search --output=threads id:${latest})\r
126 +test_emacs_expect_t \\r
127 +    "(notmuch-show \"${thread_id}\")\r
128 +    (goto-char (point-min))\r
129 +    (re-search-forward \"mytagfoo\")\r
130 +    (backward-char) ;; to be 'in' the tag\r
131 +    (unless (eq major-mode 'notmuch-show-mode)\r
132 +       (error \"We must be in notmuch-show at this point but we are in %s.\" major-mode))\r
133 +    (push-button) ;; simulate a press on the RET key\r
134 +    (if (eq major-mode 'notmuch-search-mode)\r
135 +        t\r
136 +       (format \"We must be in notmuch-search at this point but we are in %s.\" major-mode))"\r
137  \r
138  test_done\r
139 -- \r
140 1.7.10.4\r
141 \r