[PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 62 / a2307f9a3911db2777f2c8e50804eb1aa7499f
1 Return-Path: <bremner@tethera.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 arlo.cworth.org (Postfix) with ESMTP id 60ACC6DE0022\r
6  for <notmuch@notmuchmail.org>; Tue,  5 Apr 2016 04:18:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.02\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.009,\r
12   SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id v0p1vg7PN56E for <notmuch@notmuchmail.org>;\r
16  Tue,  5 Apr 2016 04:18:20 -0700 (PDT)\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id 05EA26DE0159\r
19  for <notmuch@notmuchmail.org>; Tue,  5 Apr 2016 04:18:20 -0700 (PDT)\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
21  (envelope-from <bremner@tethera.net>)\r
22  id 1anP0X-0002xy-Fk; Tue, 05 Apr 2016 07:18:53 -0400\r
23 Received: (nullmailer pid 5779 invoked by uid 1000);\r
24  Tue, 05 Apr 2016 11:18:15 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: notmuch@notmuchmail.org\r
27 Subject: [PATCH 1/2] test: improve error handling in lib-error tests\r
28 Date: Tue,  5 Apr 2016 08:18:01 -0300\r
29 Message-Id: <1459855082-5715-2-git-send-email-david@tethera.net>\r
30 X-Mailer: git-send-email 2.8.0.rc3\r
31 In-Reply-To: <1459855082-5715-1-git-send-email-david@tethera.net>\r
32 References: <1459855082-5715-1-git-send-email-david@tethera.net>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.20\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37  <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
39  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
44  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Tue, 05 Apr 2016 11:18:29 -0000\r
46 \r
47 There is at least one bug fixed here (missing parameter to printf), even\r
48 if exiting via segfault is considered OK.\r
49 ---\r
50  test/T560-lib-error.sh | 12 ++++++++----\r
51  1 file changed, 8 insertions(+), 4 deletions(-)\r
52 \r
53 diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh\r
54 index 59a479c..49d3674 100755\r
55 --- a/test/T560-lib-error.sh\r
56 +++ b/test/T560-lib-error.sh\r
57 @@ -202,16 +202,20 @@ int main (int argc, char** argv)\r
58     notmuch_database_t *db;\r
59     notmuch_status_t stat;\r
60     char *path;\r
61 +   char *msg = NULL;\r
62     int fd;\r
63  \r
64 -   stat = notmuch_database_open (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db);\r
65 +   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);\r
66     if (stat != NOTMUCH_STATUS_SUCCESS) {\r
67 -     fprintf (stderr, "error opening database: %d\n", stat);\r
68 +     fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");\r
69 +     exit (1);\r
70     }\r
71     path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.DB", argv[1]);\r
72     fd = open(path,O_WRONLY|O_TRUNC);\r
73 -   if (fd < 0)\r
74 -       fprintf (stderr, "error opening %s\n");\r
75 +   if (fd < 0) {\r
76 +       fprintf (stderr, "error opening %s\n", argv[1]);\r
77 +       exit (1);\r
78 +   }\r
79  EOF\r
80  cat <<'EOF' > c_tail\r
81     if (stat) {\r
82 -- \r
83 2.8.0.rc3\r
84 \r