1 Return-Path: <pieter@praet.org>
\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 693C1429E32
\r
6 for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:18:01 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 DHVrT0OxEM8Z for <notmuch@notmuchmail.org>;
\r
16 Fri, 13 May 2011 01:18:00 -0700 (PDT)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 7AC2F431FD0 for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:18:00 -0700
\r
22 Received: by wwi36 with SMTP id 36so2086798wwi.2
\r
23 for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:17:59 -0700 (PDT)
\r
24 Received: by 10.216.234.80 with SMTP id r58mr1044643weq.109.1305274679247;
\r
25 Fri, 13 May 2011 01:17:59 -0700 (PDT)
\r
26 Received: from localhost (54.209-242-81.adsl-dyn.isp.belgacom.be
\r
28 by mx.google.com with ESMTPS id o1sm1000886wej.32.2011.05.13.01.17.57
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Fri, 13 May 2011 01:17:58 -0700 (PDT)
\r
31 From: Pieter Praet <pieter@praet.org>
\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
33 Subject: [PATCH 2/4] test: add 'GPG' prereq to 'crypto' tests
\r
34 Date: Fri, 13 May 2011 10:17:14 +0200
\r
35 Message-Id: <1305274636-19975-3-git-send-email-pieter@praet.org>
\r
36 X-Mailer: git-send-email 1.7.4.1
\r
37 In-Reply-To: <1305274636-19975-1-git-send-email-pieter@praet.org>
\r
38 References: <1305274636-19975-1-git-send-email-pieter@praet.org>
\r
39 Cc: Austin Clements <amdragon@mit.edu>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Fri, 13 May 2011 08:18:01 -0000
\r
54 Signed-off-by: Pieter Praet <pieter@praet.org>
\r
56 test/crypto | 30 ++++++++++++++++++------------
\r
57 1 files changed, 18 insertions(+), 12 deletions(-)
\r
59 diff --git a/test/crypto b/test/crypto
\r
60 index 961d035..c2f381c 100755
\r
64 test_description='PGP/MIME signature verification and decryption'
\r
67 +# GnuPG is a prereq.
\r
68 +if test_expect_success "prereq: GnuPG is present" "which gpg"; then
\r
69 + test_set_prereq GPG
\r
76 @@ -31,7 +37,7 @@ FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep
\r
77 # although I can't figure out why
\r
80 -test_expect_success 'emacs delivery of signed message' \
\r
81 +test_expect_success GPG 'emacs delivery of signed message' \
\r
82 'emacs_deliver_message \
\r
83 "test signed message 001" \
\r
84 "This is a test signed message." \
\r
85 @@ -66,7 +72,7 @@ expected='[[[{"id": "XXXXX",
\r
86 "content-type": "application/pgp-signature"}]}
\r
89 -test_expect_equal \
\r
90 +test_expect_equal GPG \
\r
94 @@ -103,7 +109,7 @@ expected='[[[{"id": "XXXXX",
\r
95 "content-type": "application/pgp-signature"}]}
\r
98 -test_expect_equal \
\r
99 +test_expect_equal GPG \
\r
103 @@ -139,7 +145,7 @@ expected='[[[{"id": "XXXXX",
\r
104 "content-type": "application/pgp-signature"}]}
\r
107 -test_expect_equal \
\r
108 +test_expect_equal GPG \
\r
111 mv "${GNUPGHOME}"{.bak,}
\r
112 @@ -148,7 +154,7 @@ mv "${GNUPGHOME}"{.bak,}
\r
113 cat <<EOF >TESTATTACHMENT
\r
114 This is a test file.
\r
116 -test_expect_success 'emacs delivery of encrypted message with attachment' \
\r
117 +test_expect_success GPG 'emacs delivery of encrypted message with attachment' \
\r
118 'emacs_deliver_message \
\r
119 "test encrypted message 001" \
\r
120 "This is a test encrypted message." \
\r
121 @@ -186,7 +192,7 @@ expected='[[[{"id": "XXXXX",
\r
122 "filename": "TESTATTACHMENT"}]}
\r
125 -test_expect_equal \
\r
126 +test_expect_equal GPG \
\r
130 @@ -195,7 +201,7 @@ notmuch show \
\r
131 --format=part --part=4 \
\r
133 subject:"test encrypted message 001" >OUTPUT
\r
134 -test_expect_equal_file OUTPUT TESTATTACHMENT
\r
135 +test_expect_equal_file GPG OUTPUT TESTATTACHMENT
\r
137 test_begin_subtest "decryption failure with missing key"
\r
138 mv "${GNUPGHOME}"{,.bak}
\r
139 @@ -224,12 +230,12 @@ expected='[[[{"id": "XXXXX",
\r
140 "content-type": "application/octet-stream"}]}
\r
143 -test_expect_equal \
\r
144 +test_expect_equal GPG \
\r
147 mv "${GNUPGHOME}"{.bak,}
\r
149 -test_expect_success 'emacs delivery of encrypted/signed message' \
\r
150 +test_expect_success GPG 'emacs delivery of encrypted/signed message' \
\r
151 'emacs_deliver_message \
\r
152 "test encrypted message 002" \
\r
153 "This is a test encrypted message." \
\r
154 @@ -263,7 +269,7 @@ expected='[[[{"id": "XXXXX",
\r
155 "content-type": "text/plain",
\r
156 "content": "This is a test encrypted message.\n"}]}]},
\r
158 -test_expect_equal \
\r
159 +test_expect_equal GPG \
\r
163 @@ -275,7 +281,7 @@ Subject: Re: test encrypted message 002
\r
165 On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
166 > This is a test encrypted message.'
\r
167 -test_expect_equal \
\r
168 +test_expect_equal GPG \
\r
172 @@ -319,7 +325,7 @@ expected='[[[{"id": "XXXXX",
\r
173 "content-type": "application/pgp-signature"}]}
\r
176 -test_expect_equal \
\r
177 +test_expect_equal GPG \
\r