Re: [PATCH] emacs: call notmuch-show instead notmuch-search in buttonised id: links
[notmuch-archives.git] / 89 / 8e807c7943dd777500cf86a975a1230362b82f
1 Return-Path: <dmitry.kurochkin@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 16FD5429E44\r
6         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 17:57:06 -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 PIZJXiqR27Ev for <notmuch@notmuchmail.org>;\r
17         Wed, 16 Nov 2011 17:57:04 -0800 (PST)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 07817429E2E\r
22         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 17:56:54 -0800 (PST)\r
23 Received: by mail-bw0-f53.google.com with SMTP id q10so1456807bka.26\r
24         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 17:56:54 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=fQ3NP9/UoQnEjXReAX4S7QA127u2pjlZTGmrqY1lPJk=;\r
28         b=pfXhWXBjRSnaOGEJ68Ea6tff7B6TiHokT05AjI1ImQ7ZMvcPnATkia8QgOpnamr+6/\r
29         wQhDU/hKTilXzZXMKRNmyXy02il40jfgu6y5VlD9RRmHj8/fdk4atFq+8O5zrTVrB151\r
30         M5r560LxtgSOf0qpfHBRUJGc6OcY1hYGU8HQ4=\r
31 Received: by 10.205.120.2 with SMTP id fw2mr22930014bkc.10.1321495014488;\r
32         Wed, 16 Nov 2011 17:56:54 -0800 (PST)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id z7sm40120914bka.1.2011.11.16.17.56.53\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Wed, 16 Nov 2011 17:56:54 -0800 (PST)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH 3/9] test: add test state reset to test_expect_* functions\r
40         that did not have it\r
41 Date: Thu, 17 Nov 2011 05:56:20 +0400\r
42 Message-Id: <1321494986-18998-4-git-send-email-dmitry.kurochkin@gmail.com>\r
43 X-Mailer: git-send-email 1.7.7.2\r
44 In-Reply-To: <1321494986-18998-1-git-send-email-dmitry.kurochkin@gmail.com>\r
45 References: <1321494986-18998-1-git-send-email-dmitry.kurochkin@gmail.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Thu, 17 Nov 2011 01:57:06 -0000\r
59 \r
60 ---\r
61  test/test-lib.sh |    3 +++\r
62  1 files changed, 3 insertions(+), 0 deletions(-)\r
63 \r
64 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
65 index ff85848..f21e45e 100755\r
66 --- a/test/test-lib.sh\r
67 +++ b/test/test-lib.sh\r
68 @@ -622,82 +622,85 @@ test_skip () {\r
69                 test_reset_state_\r
70                 say_color skip >&3 "skipping test: $@"\r
71                 say_color skip "%-6s" "SKIP"\r
72                 echo " $1"\r
73                 : true\r
74                 ;;\r
75         *)\r
76                 false\r
77                 ;;\r
78         esac\r
79  }\r
80  \r
81  test_subtest_known_broken () {\r
82         test_subtest_known_broken_=t\r
83  }\r
84  \r
85  test_expect_success () {\r
86         test "$#" = 3 && { prereq=$1; shift; } || prereq=\r
87         test "$#" = 2 ||\r
88         error "bug in the test script: not 2 or 3 parameters to test-expect-success"\r
89 +       test_reset_state_\r
90         if ! test_skip "$@"\r
91         then\r
92                 test_run_ "$2"\r
93                 if [ "$?" = 0 -a "$eval_ret" = 0 ]\r
94                 then\r
95                         test_ok_ "$1"\r
96                 else\r
97                         test_failure_ "$@"\r
98                 fi\r
99         fi\r
100  }\r
101  \r
102  test_expect_code () {\r
103         test "$#" = 4 && { prereq=$1; shift; } || prereq=\r
104         test "$#" = 3 ||\r
105         error "bug in the test script: not 3 or 4 parameters to test-expect-code"\r
106 +       test_reset_state_\r
107         if ! test_skip "$@"\r
108         then\r
109                 test_run_ "$3"\r
110                 if [ "$?" = 0 -a "$eval_ret" = "$1" ]\r
111                 then\r
112                         test_ok_ "$2"\r
113                 else\r
114                         test_failure_ "$@"\r
115                 fi\r
116         fi\r
117  }\r
118  \r
119  # test_external runs external test scripts that provide continuous\r
120  # test output about their progress, and succeeds/fails on\r
121  # zero/non-zero exit code.  It outputs the test output on stdout even\r
122  # in non-verbose mode, and announces the external script with "* run\r
123  # <n>: ..." before running it.  When providing relative paths, keep in\r
124  # mind that all scripts run in "trash directory".\r
125  # Usage: test_external description command arguments...\r
126  # Example: test_external 'Perl API' perl ../path/to/test.pl\r
127  test_external () {\r
128         test "$#" = 4 && { prereq=$1; shift; } || prereq=\r
129         test "$#" = 3 ||\r
130         error >&5 "bug in the test script: not 3 or 4 parameters to test_external"\r
131         descr="$1"\r
132         shift\r
133 +       test_reset_state_\r
134         if ! test_skip "$descr" "$@"\r
135         then\r
136                 # Announce the script to reduce confusion about the\r
137                 # test output that follows.\r
138                 say_color "" " run $test_count: $descr ($*)"\r
139                 # Run command; redirect its stderr to &4 as in\r
140                 # test_run_, but keep its stdout on our stdout even in\r
141                 # non-verbose mode.\r
142                 "$@" 2>&4\r
143                 if [ "$?" = 0 ]\r
144                 then\r
145                         test_ok_ "$descr"\r
146                 else\r
147                         test_failure_ "$descr" "$@"\r
148                 fi\r
149         fi\r
150  }\r
151  \r
152  # Like test_external, but in addition tests that the command generated\r
153  # no output on stderr.\r
154 -- \r
155 1.7.7.2\r
156 \r