--- /dev/null
+Return-Path: <novalazy@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4E7D7431FC3\r
+ for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 55shzhyV-yzb for <notmuch@notmuchmail.org>;\r
+ Fri, 13 Apr 2012 18:43:55 -0700 (PDT)\r
+Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com\r
+ [209.85.210.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id C3612431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:55 -0700 (PDT)\r
+Received: by mail-pz0-f45.google.com with SMTP id x6so4544874dac.18\r
+ for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:55 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+ bh=Oggmgo4qqG09ljw4KFddtGG8l26Xz84pyiEu4BUUehw=;\r
+ b=BeDkhREOHrf/anflHJBGo3p7GdjdFKNAlQLeXB8dv5XfVQKM3DuR4L5dwcZSRzMQIA\r
+ 7Ugi4S8aIjWzxtw5+oehjXtMZCHNDAgkd5BA6iTkoDlARhg73R/5LPn2FaGpqC6K5yLU\r
+ eqyX8GUXS+8HsEEHfGmNXZKQXK5yYvE+fIrKxaADJLEHXmscJaQ2X0vveMesdxJrsdiy\r
+ PqKY799PHr7IzvlQ35qvjAAWrcPYeiRQ0fvd0qsbVcWUYl4Y4zl9bkMVN/X5jo2G6aua\r
+ hLXvx/IMUfarP4O/anYAC7W/zHdfvgyOrL+6X2yvpaPVwIbTtLUWus3cvIu9ft/CPGnh\r
+ QGAA==\r
+Received: by 10.68.204.228 with SMTP id lb4mr8948026pbc.37.1334367835591;\r
+ Fri, 13 Apr 2012 18:43:55 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+ [220.233.42.215])\r
+ by mx.google.com with ESMTPS id oh2sm3677446pbb.45.2012.04.13.18.43.49\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Fri, 13 Apr 2012 18:43:54 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 3/6] test: Add tests for 'config' command\r
+Date: Sat, 14 Apr 2012 11:41:03 +1000\r
+Message-Id: <1334367666-10954-4-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.4\r
+In-Reply-To: <1334367666-10954-1-git-send-email-novalazy@gmail.com>\r
+References: <1332282698-7951-1-git-send-email-novalazy@gmail.com>\r
+ <1334367666-10954-1-git-send-email-novalazy@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 14 Apr 2012 01:43:56 -0000\r
+\r
+Start a new test script.\r
+---\r
+ test/config | 45 +++++++++++++++++++++++++++++++++++++++++++++\r
+ test/notmuch-test | 1 +\r
+ 2 files changed, 46 insertions(+), 0 deletions(-)\r
+ create mode 100755 test/config\r
+\r
+diff --git a/test/config b/test/config\r
+new file mode 100755\r
+index 0000000..9030154\r
+--- /dev/null\r
++++ b/test/config\r
+@@ -0,0 +1,45 @@\r
++#!/usr/bin/env bash\r
++\r
++test_description='"notmuch config"'\r
++. test-lib.sh\r
++\r
++test_begin_subtest "Get string value"\r
++test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"\r
++\r
++test_begin_subtest "Get list value"\r
++test_expect_equal "$(notmuch config get new.tags)" "\\r
++unread\r
++inbox"\r
++\r
++test_begin_subtest "Set string value"\r
++notmuch config set foo.string "this is a string value"\r
++test_expect_equal "$(notmuch config get foo.string)" "this is a string value"\r
++\r
++test_begin_subtest "Set string value again"\r
++notmuch config set foo.string "this is another string value"\r
++test_expect_equal "$(notmuch config get foo.string)" "this is another string value"\r
++\r
++test_begin_subtest "Set list value"\r
++notmuch config set foo.list this "is a" "list value"\r
++test_expect_equal "$(notmuch config get foo.list)" "\\r
++this\r
++is a\r
++list value"\r
++\r
++test_begin_subtest "Set list value again"\r
++notmuch config set foo.list this "is another" "list value"\r
++test_expect_equal "$(notmuch config get foo.list)" "\\r
++this\r
++is another\r
++list value"\r
++\r
++test_begin_subtest "Remove key"\r
++notmuch config set foo.remove baz\r
++notmuch config set foo.remove\r
++test_expect_equal "$(notmuch config get foo.remove)" ""\r
++\r
++test_begin_subtest "Remove non-existent key"\r
++notmuch config set foo.nonexistent\r
++test_expect_equal "$(notmuch config get foo.nonexistent)" ""\r
++\r
++test_done\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index f03b594..e08ec72 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -19,6 +19,7 @@ cd $(dirname "$0")\r
+ TESTS="\r
+ basic\r
+ help-test\r
++ config\r
+ new\r
+ count\r
+ search\r
+-- \r
+1.7.4.4\r
+\r