Re: [PATCH v4 03/16] make shared crypto code behave library-like
[notmuch-archives.git] / a9 / 54389d428bfaa97bd6c06896c127c2e0d4ca5f
1 Return-Path: <bremner@tesseract.cs.unb.ca>\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 7B798429E31\r
6         for <notmuch@notmuchmail.org>; Sat, 14 Mar 2015 10:05:36 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 HooVhyqh6GO9 for <notmuch@notmuchmail.org>;\r
16         Sat, 14 Mar 2015 10:05:36 -0700 (PDT)\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
18         [87.98.215.224])\r
19         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 0D08A429E30\r
22         for <notmuch@notmuchmail.org>; Sat, 14 Mar 2015 10:05:36 -0700 (PDT)\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
24         4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
25         id 1YWpUd-00029K-3L; Sat, 14 Mar 2015 17:04:55 +0000\r
26 Received: (nullmailer pid 4981 invoked by uid 1000); Sat, 14 Mar 2015\r
27         17:02:41 -0000\r
28 From: David Bremner <david@tethera.net>\r
29 To: notmuch@notmuchmail.org\r
30 Subject: [Patch v4 1/9] test: Add two tests for error output from\r
31         notmuch_database_open\r
32 Date: Sat, 14 Mar 2015 18:02:26 +0100\r
33 Message-Id: <1426352554-4383-2-git-send-email-david@tethera.net>\r
34 X-Mailer: git-send-email 2.1.4\r
35 In-Reply-To: <1426352554-4383-1-git-send-email-david@tethera.net>\r
36 References: <1426352554-4383-1-git-send-email-david@tethera.net>\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sat, 14 Mar 2015 17:05:36 -0000\r
50 \r
51 This is arguably testing the same thing twice, but in the brave new\r
52 future where we don't use printf anymore, each subcommand will be\r
53 responsible for handling the output on it's own.\r
54 ---\r
55  test/T050-new.sh     | 7 +++++++\r
56  test/T150-tagging.sh | 6 ++++++\r
57  2 files changed, 13 insertions(+)\r
58 \r
59 diff --git a/test/T050-new.sh b/test/T050-new.sh\r
60 index 7119356..e6c3291 100755\r
61 --- a/test/T050-new.sh\r
62 +++ b/test/T050-new.sh\r
63 @@ -276,4 +276,11 @@ test_expect_code 1 "Invalid tags set exit code" \\r
64  \r
65  notmuch config set new.tags $OLDCONFIG\r
66  \r
67 +\r
68 +test_begin_subtest "Xapian exception: read only files"\r
69 +chmod u-w  ${MAIL_DIR}/.notmuch/xapian/*.DB\r
70 +output=$(NOTMUCH_NEW 2>&1 | sed 's/: .*$//' )\r
71 +chmod u+w  ${MAIL_DIR}/.notmuch/xapian/*.DB\r
72 +test_expect_equal "$output" "A Xapian exception occurred opening database"\r
73 +\r
74  test_done\r
75 diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh\r
76 index 45471ac..4a2673d 100755\r
77 --- a/test/T150-tagging.sh\r
78 +++ b/test/T150-tagging.sh\r
79 @@ -261,4 +261,10 @@ test_expect_code 1 "Empty tag names" 'notmuch tag + One'\r
80  \r
81  test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'\r
82  \r
83 +test_begin_subtest "Xapian exception: read only files"\r
84 +chmod u-w  ${MAIL_DIR}/.notmuch/xapian/*.DB\r
85 +output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )\r
86 +chmod u+w  ${MAIL_DIR}/.notmuch/xapian/*.DB\r
87 +test_expect_equal "$output" "A Xapian exception occurred opening database"\r
88 +\r
89  test_done\r
90 -- \r
91 2.1.4\r
92 \r