1 Return-Path: <novalazy@gmail.com>
\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 6195F431E64
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Mar 2012 16:16:18 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id wrZU-7pXn2rx for <notmuch@notmuchmail.org>;
\r
17 Fri, 30 Mar 2012 16:16:17 -0700 (PDT)
\r
18 Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com
\r
19 [209.85.210.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 8CC6A431FAF
\r
22 for <notmuch@notmuchmail.org>; Fri, 30 Mar 2012 16:16:17 -0700 (PDT)
\r
23 Received: by mail-pz0-f45.google.com with SMTP id x6so56814dac.18
\r
24 for <notmuch@notmuchmail.org>; Fri, 30 Mar 2012 16:16:17 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=4C1YuE0pvhO+6XV5o7nH0c6arw8faDEs+hrXAMRDfXc=;
\r
28 b=curk3m99s9qMbNLXn43FYuSLNjmjHw75KEnH4wNwJ9av4rhJjbk7vUWPzMz/jQo+yW
\r
29 JmP0oEgj9SE4kAuPVONOtAD8Dhkz18AUwwnfZ4H2eIkSs4LJ/ifUDj/rVrFii8BHm7uF
\r
30 /555Hy+mKg7RmzIxf4YMsyiFRlg58U8481VAwAN6FD8Ix1aBpbnDWgJQkP8+XivXL38I
\r
31 cjhSYhu58eVn9S73aztpX6sm5L8c1jsVB+EfUq1M9sVRjVkq1YYMhD3vTUTaTZ28prqQ
\r
32 eIr1rq6uT9P3cKft4HPgNhL04A7M+sGu0sSk/XKoG7Nx5znilXCF/ODdS7T+4sLf9X+G
\r
34 Received: by 10.68.242.38 with SMTP id wn6mr1211814pbc.72.1333149377232;
\r
35 Fri, 30 Mar 2012 16:16:17 -0700 (PDT)
\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.
\r
38 by mx.google.com with ESMTPS id s7sm6894210pbl.31.2012.03.30.16.16.14
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Fri, 30 Mar 2012 16:16:16 -0700 (PDT)
\r
41 From: Peter Wang <novalazy@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v2 2/5] test: Add tests for 'config' command
\r
44 Date: Sat, 31 Mar 2012 10:15:47 +1100
\r
45 Message-Id: <1333149350-22616-3-git-send-email-novalazy@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.4.4
\r
47 In-Reply-To: <1333149350-22616-1-git-send-email-novalazy@gmail.com>
\r
48 References: <1332282698-7951-1-git-send-email-novalazy@gmail.com>
\r
49 <1333149350-22616-1-git-send-email-novalazy@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Fri, 30 Mar 2012 23:16:18 -0000
\r
64 Start a new test script.
\r
66 test/config | 20 ++++++++++++++++++++
\r
67 test/notmuch-test | 1 +
\r
68 2 files changed, 21 insertions(+), 0 deletions(-)
\r
69 create mode 100755 test/config
\r
71 diff --git a/test/config b/test/config
\r
72 new file mode 100755
\r
73 index 0000000..d3e574c
\r
77 +#!/usr/bin/env bash
\r
79 +test_description='"notmuch config"'
\r
82 +test_begin_subtest "Get string value"
\r
83 +test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
\r
85 +test_begin_subtest "Get list value"
\r
86 +test_expect_equal "$(notmuch config get new.tags)" "\
\r
90 +test_expect_success "Set string value" \
\r
91 + 'notmuch config set foo.bar baz'
\r
93 +test_expect_success "Set list value" \
\r
94 + 'notmuch config set foo.list xxx "yyy yyy" "zzz zzz"'
\r
97 diff --git a/test/notmuch-test b/test/notmuch-test
\r
98 index f03b594..e08ec72 100755
\r
99 --- a/test/notmuch-test
\r
100 +++ b/test/notmuch-test
\r
101 @@ -19,6 +19,7 @@ cd $(dirname "$0")
\r