[PATCH v4 0/7] emacs: Improve the cited message included in replies
[notmuch-archives.git] / 9b / dedcd86405d39f32aa6fd54326a3853c2ad622
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 4C517429E36\r
6         for <notmuch@notmuchmail.org>; Fri, 28 Oct 2011 20:05:08 -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.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 Cd9B-VHgMOlu for <notmuch@notmuchmail.org>;\r
16         Fri, 28 Oct 2011 20:05:07 -0700 (PDT)\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id B5019429E2E\r
21         for <notmuch@notmuchmail.org>; Fri, 28 Oct 2011 20:05:03 -0700 (PDT)\r
22 Received: from zancas.localnet\r
23         (fctnnbsc36w-156034064058.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
24         [156.34.64.58]) (authenticated bits=0)\r
25         by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p9T34x5T016362\r
26         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
27         Sat, 29 Oct 2011 00:04:59 -0300\r
28 Received: from bremner by zancas.localnet with local (Exim 4.76)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1RJzEB-0003DB-0w; Sat, 29 Oct 2011 00:04:59 -0300\r
31 From: David Bremner <david@tethera.net>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH 1/4] notmuch-restore: add tests for new --match command line\r
34         argument.\r
35 Date: Sat, 29 Oct 2011 00:04:48 -0300\r
36 Message-Id: <1319857491-12298-2-git-send-email-david@tethera.net>\r
37 X-Mailer: git-send-email 1.7.6.3\r
38 In-Reply-To: <1319857491-12298-1-git-send-email-david@tethera.net>\r
39 References: <1319406673-7208-1-git-send-email-david@tethera.net>\r
40         <1319857491-12298-1-git-send-email-david@tethera.net>\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: Sat, 29 Oct 2011 03:05:08 -0000\r
55 \r
56 From: David Bremner <bremner@debian.org>\r
57 \r
58 The syntax is notmuch restore --match=regex\r
59 \r
60 We check here that\r
61 - missing regex fails\r
62 - bad regex fails\r
63 - good regex succeeds (at least the command line argument parsing).\r
64 ---\r
65  test/dump-restore |   17 ++++++++++++++++-\r
66  1 files changed, 16 insertions(+), 1 deletions(-)\r
67 \r
68 diff --git a/test/dump-restore b/test/dump-restore\r
69 index 439e998..c176b52 100755\r
70 --- a/test/dump-restore\r
71 +++ b/test/dump-restore\r
72 @@ -50,9 +50,24 @@ test_expect_success 'Restore with nothing to do, III' \\r
73    test_cmp dump.expected dump.actual'\r
74  \r
75  # notmuch restore currently only considers the first argument.\r
76 -test_expect_success 'Invalid restore invocation' \\r
77 +test_expect_success 'restore extra argument' \\r
78    'test_must_fail notmuch restore dump.expected another_one'\r
79  \r
80 +\r
81 +test_begin_subtest 'restore --match #missing arg'\r
82 +test_subtest_known_broken\r
83 +test_expect_equal "restore: option '--match' requires an argument"\\r
84 +  "$(notmuch restore --match 2>&1)"\r
85 +\r
86 +test_begin_subtest 'restore --match=<bad regex>'\r
87 +test_subtest_known_broken\r
88 +test_expect_equal 'compiling regex notmuch.*[: Invalid regular expression'\\r
89 +  "$(notmuch restore --match='notmuch.*[' 2>&1)"\r
90 +\r
91 +test_subtest_known_broken\r
92 +test_expect_success 'restore --match=<good regex>' \\r
93 +    'notmuch restore --match="notmuch.*" < /dev/null > /dev/null 2>&1'\r
94 +\r
95  test_begin_subtest "dump outfile"\r
96  notmuch dump dump-outfile.actual\r
97  test_expect_equal_file dump.expected dump-outfile.actual\r
98 -- \r
99 1.7.6.3\r
100 \r