Re: [PATCH] _notmuch_message_index_file: unref (free) address lists from gmime.
[notmuch-archives.git] / ab / e8df33b6b7ab17a68ef7140c47e7e539607b84
1 Return-Path: <schnouki@schnouki.net>\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 B6A3442116A\r
6         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 06:34:49 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
13         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 geJYYwq+iys3 for <notmuch@notmuchmail.org>;\r
17         Wed, 16 Nov 2011 06:34:49 -0800 (PST)\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
19         by olra.theworths.org (Postfix) with ESMTP id 7B1C4429E52\r
20         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 06:34:25 -0800 (PST)\r
21 Received: from thor.loria.fr (thor.loria.fr [152.81.12.250])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id 56B9C6A0028;\r
23         Wed, 16 Nov 2011 15:34:24 +0100 (CET)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1321454064;\r
26         bh=neWK76obMY5ADtHEpTYm3wwYdWQz1LNCJuv8XwHXEnI=;\r
27         h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
28         b=AyGCOS8o9Ex9WchaRCkpfuXDyA+xRAHUC0G8IkgWykJOO9PZ637KRQS4wklPUnc08\r
29         tgUQQjRPTsikHSwI42dn9gN5L507vNAmVjxMKr2z1v6i2YOyiu6n4L5qUVzMgdDfHh\r
30         oELvMm65u67LhJCFKTWh1zxUhaNNPvuRyML0yyaQ=\r
31 From: Thomas Jost <schnouki@schnouki.net>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH 1/6] test: define a helper function for defining prereqs on\r
34         executables\r
35 Date: Wed, 16 Nov 2011 15:33:50 +0100\r
36 Message-Id: <1321454035-22023-2-git-send-email-schnouki@schnouki.net>\r
37 X-Mailer: git-send-email 1.7.7.3\r
38 In-Reply-To: <1321454035-22023-1-git-send-email-schnouki@schnouki.net>\r
39 References: <1320176954-4897-1-git-send-email-pieter@praet.org>\r
40         <1321454035-22023-1-git-send-email-schnouki@schnouki.net>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 16 Nov 2011 14:34:50 -0000\r
54 \r
55 While test_expect_success could be used to define these prereqs, this is\r
56 probably not a good idea: if a prereq is not available, using\r
57 test_expect_success would result in a test being reported as FAILED at the end\r
58 of the test suite (and its dependencies as skipped).\r
59 \r
60 (Thanks to Pieter Praet for suggesting the use of "hash" instead of "which".)\r
61 ---\r
62  test/test-lib.sh |   13 +++++++++++++\r
63  1 files changed, 13 insertions(+), 0 deletions(-)\r
64 \r
65 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
66 index 1ea7fa9..382934f 100755\r
67 --- a/test/test-lib.sh\r
68 +++ b/test/test-lib.sh\r
69 @@ -543,6 +543,19 @@ test_have_prereq () {\r
70         esac\r
71  }\r
72  \r
73 +test_set_bin_prereq () {\r
74 +       bin=$1\r
75 +       name=$2\r
76 +       prereq=$3\r
77 +       if hash $bin &>/dev/null\r
78 +       then\r
79 +               test_set_prereq $prereq\r
80 +       else\r
81 +               say_color info "%-6s" "INFO"\r
82 +               echo " Missing test prerequisite: $name"\r
83 +       fi\r
84 +}\r
85 +\r
86  # You are not expected to call test_ok_ and test_failure_ directly, use\r
87  # the text_expect_* functions instead.\r
88  \r
89 -- \r
90 1.7.7.3\r
91 \r