[PATCH] emacs: replace setq + let with let*
[notmuch-archives.git] / 15 / 5fb95695eb9465a49b8fcb3ca9531442e0e408
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 olra.theworths.org (Postfix) with ESMTP id ABE86431FAE\r
6         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 18:35:28 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 gUu2nxbdLiIj for <notmuch@notmuchmail.org>;\r
16         Thu,  1 Mar 2012 18:35:28 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id A3EDA431FD7\r
21         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 18:35:27 -0800 (PST)\r
22 Received: from fctnnbsc30w-142166230117.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([142.166.230.117] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)\r
25         (Exim 4.72) (envelope-from <bremner@tethera.net>)\r
26         id 1S3IL7-00085q-Ux; Thu, 01 Mar 2012 22:35:26 -0400\r
27 Received: from bremner by zancas.localnet with local (Exim 4.77)\r
28         (envelope-from <bremner@tethera.net>)\r
29         id 1S3IL2-0001ur-MX; Thu, 01 Mar 2012 22:35:20 -0400\r
30 From: David Bremner <david@tethera.net>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH 1/2] test: utility function to add a pre-generated message to\r
33         the database.\r
34 Date: Thu,  1 Mar 2012 22:35:07 -0400\r
35 Message-Id: <1330655708-7318-2-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.9\r
37 In-Reply-To: <1330655708-7318-1-git-send-email-david@tethera.net>\r
38 References: <20120301215738.GA7466@mit.edu>\r
39         <1330655708-7318-1-git-send-email-david@tethera.net>\r
40 X-Spam_bar: -\r
41 Cc: David Bremner <bremner@debian.org>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Fri, 02 Mar 2012 02:35:28 -0000\r
55 \r
56 From: David Bremner <bremner@debian.org>\r
57 \r
58 For various "nasty" messages, it is easier to ship a message rather\r
59 than try to generate a message which causes a failure.\r
60 ---\r
61  test/test-lib.sh |   15 +++++++++++++++\r
62  1 files changed, 15 insertions(+), 0 deletions(-)\r
63 \r
64 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
65 index 2781506..17d0e48 100644\r
66 --- a/test/test-lib.sh\r
67 +++ b/test/test-lib.sh\r
68 @@ -376,6 +376,21 @@ ${template[body]}\r
69  EOF\r
70  }\r
71  \r
72 +# Add an existing message to the notmuch database.\r
73 +#\r
74 +# expects a message on stdin.\r
75 +#\r
76 +# uses the variable gen_msg_cnt from generate_message.\r
77 +\r
78 +add_rfc822_message ()\r
79 +{\r
80 +    gen_msg_cnt=$((gen_msg_cnt + 1))\r
81 +    gen_msg_name="msg-$(printf "%03d" $gen_msg_cnt)"\r
82 +    gen_msg_filename="${MAIL_DIR}/$gen_msg_name"\r
83 +    cat >$gen_msg_filename\r
84 +    notmuch new > /dev/null\r
85 +}\r
86 +\r
87  # Generate a new message and add it to the database.\r
88  #\r
89  # All of the arguments and return values supported by generate_message\r
90 -- \r
91 1.7.9\r
92 \r