From 7d8532f72c79cfabc951a492985af416eee4c48a Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Fri, 6 Apr 2012 11:48:03 +1000 Subject: [PATCH] [PATCH v3 2/5] test: Add tests for 'config' command --- 3c/918c0579c2ec87dc688051ac9c324cf17fcba9 | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 3c/918c0579c2ec87dc688051ac9c324cf17fcba9 diff --git a/3c/918c0579c2ec87dc688051ac9c324cf17fcba9 b/3c/918c0579c2ec87dc688051ac9c324cf17fcba9 new file mode 100644 index 000000000..a7b78cf47 --- /dev/null +++ b/3c/918c0579c2ec87dc688051ac9c324cf17fcba9 @@ -0,0 +1,116 @@ +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 CEBE1431FAE + for ; Thu, 5 Apr 2012 18:48:54 -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 7m79flPd5Ujo for ; + Thu, 5 Apr 2012 18:48:53 -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 DF2EA431FC3 + for ; Thu, 5 Apr 2012 18:48:52 -0700 (PDT) +Received: by mail-pz0-f45.google.com with SMTP id x6so2370746dac.18 + for ; Thu, 05 Apr 2012 18:48:52 -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=lSXF8dXoTSJUPUSDS8j6jlm9H12EIT2KLk2XbAKhpgs=; + b=xHlU2RisdlbI71pHYRbQt8KauGOoGLNMd0xtV3WsFyL51MxNWz5JhqLxZDsCyCzyas + c7yK1nap7s3ntPEYS0Rmz5Xbg3NsgykKItkmZeVRj4/GGu8ZLfFS7XNYH+lrljIWlEZf + sQTUPqaqZIgjy+EXzmPYKw/Bof97D184kjhn7W+kHkaHyd0Ma+WzAZd1a8XsbLnFVnkh + pVjlYwgDJnwG3SPZdyXvcHq2XMMjvZCvLU582jXh668hAzQKSRxDJ4rTREYTa3W1wm+S + D2PgHZuBinbDwkckgMAz51n8XjkqbvsRwg4WkgyUNz4QETmqHNHi1wyRNPy5uayC9Ckv + C6Lw== +Received: by 10.68.200.5 with SMTP id jo5mr11715417pbc.42.1333676932668; + Thu, 05 Apr 2012 18:48:52 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id b3sm4789422pbm.11.2012.04.05.18.48.50 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 05 Apr 2012 18:48:51 -0700 (PDT) +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: [PATCH v3 2/5] test: Add tests for 'config' command +Date: Fri, 6 Apr 2012 11:48:03 +1000 +Message-Id: <1333676886-9835-3-git-send-email-novalazy@gmail.com> +X-Mailer: git-send-email 1.7.4.4 +In-Reply-To: <1333676886-9835-1-git-send-email-novalazy@gmail.com> +References: <1332282698-7951-1-git-send-email-novalazy@gmail.com> + <1333676886-9835-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, 06 Apr 2012 01:48:55 -0000 + +Start a new test script. +--- + test/config | 25 +++++++++++++++++++++++++ + test/notmuch-test | 1 + + 2 files changed, 26 insertions(+), 0 deletions(-) + create mode 100755 test/config + +diff --git a/test/config b/test/config +new file mode 100755 +index 0000000..75f662d +--- /dev/null ++++ b/test/config +@@ -0,0 +1,25 @@ ++#!/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_begin_subtest "Set string value" ++notmuch config set foo.bar baz ++test_expect_equal "$(notmuch config get foo.bar)" "baz" ++ ++test_begin_subtest "Set list value" ++notmuch config set foo.list xxx "yyy yyy" "zzz zzz" ++test_expect_equal "$(notmuch config get 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 + -- 2.26.2