Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6195F431E64 for ; Fri, 30 Mar 2012 16:16:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wrZU-7pXn2rx for ; Fri, 30 Mar 2012 16:16:17 -0700 (PDT) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8CC6A431FAF for ; Fri, 30 Mar 2012 16:16:17 -0700 (PDT) Received: by mail-pz0-f45.google.com with SMTP id x6so56814dac.18 for ; Fri, 30 Mar 2012 16:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=4C1YuE0pvhO+6XV5o7nH0c6arw8faDEs+hrXAMRDfXc=; b=curk3m99s9qMbNLXn43FYuSLNjmjHw75KEnH4wNwJ9av4rhJjbk7vUWPzMz/jQo+yW JmP0oEgj9SE4kAuPVONOtAD8Dhkz18AUwwnfZ4H2eIkSs4LJ/ifUDj/rVrFii8BHm7uF /555Hy+mKg7RmzIxf4YMsyiFRlg58U8481VAwAN6FD8Ix1aBpbnDWgJQkP8+XivXL38I cjhSYhu58eVn9S73aztpX6sm5L8c1jsVB+EfUq1M9sVRjVkq1YYMhD3vTUTaTZ28prqQ eIr1rq6uT9P3cKft4HPgNhL04A7M+sGu0sSk/XKoG7Nx5znilXCF/ODdS7T+4sLf9X+G A9hw== Received: by 10.68.242.38 with SMTP id wn6mr1211814pbc.72.1333149377232; Fri, 30 Mar 2012 16:16:17 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPS id s7sm6894210pbl.31.2012.03.30.16.16.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Mar 2012 16:16:16 -0700 (PDT) From: Peter Wang To: notmuch@notmuchmail.org Subject: [PATCH v2 2/5] test: Add tests for 'config' command Date: Sat, 31 Mar 2012 10:15:47 +1100 Message-Id: <1333149350-22616-3-git-send-email-novalazy@gmail.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1333149350-22616-1-git-send-email-novalazy@gmail.com> References: <1332282698-7951-1-git-send-email-novalazy@gmail.com> <1333149350-22616-1-git-send-email-novalazy@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 23:16:18 -0000 Start a new test script. --- test/config | 20 ++++++++++++++++++++ test/notmuch-test | 1 + 2 files changed, 21 insertions(+), 0 deletions(-) create mode 100755 test/config diff --git a/test/config b/test/config new file mode 100755 index 0000000..d3e574c --- /dev/null +++ b/test/config @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +test_description='"notmuch config"' +. test-lib.sh + +test_begin_subtest "Get string value" +test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite" + +test_begin_subtest "Get list value" +test_expect_equal "$(notmuch config get new.tags)" "\ +unread +inbox" + +test_expect_success "Set string value" \ + 'notmuch config set foo.bar baz' + +test_expect_success "Set list value" \ + 'notmuch config set foo.list xxx "yyy yyy" "zzz zzz"' + +test_done diff --git a/test/notmuch-test b/test/notmuch-test index f03b594..e08ec72 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -19,6 +19,7 @@ cd $(dirname "$0") TESTS=" basic help-test + config new count search -- 1.7.4.4