[PATCH 1/3] test: add some config file tests
authorJani Nikula <jani@nikula.org>
Sun, 7 Apr 2013 17:15:02 +0000 (20:15 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:16 +0000 (09:54 -0800)
08/8cc3cf3635c0307ae00be6bce148552b6bc5c6 [new file with mode: 0644]

diff --git a/08/8cc3cf3635c0307ae00be6bce148552b6bc5c6 b/08/8cc3cf3635c0307ae00be6bce148552b6bc5c6
new file mode 100644 (file)
index 0000000..d62a3a0
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <jani@nikula.org>\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 C5C15431FD4\r
+       for <notmuch@notmuchmail.org>; Sun,  7 Apr 2013 10:15:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 XbXFMtznuaKT for <notmuch@notmuchmail.org>;\r
+       Sun,  7 Apr 2013 10:15:20 -0700 (PDT)\r
+Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com\r
+       [209.85.217.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 1C9D9431FC0\r
+       for <notmuch@notmuchmail.org>; Sun,  7 Apr 2013 10:15:15 -0700 (PDT)\r
+Received: by mail-lb0-f175.google.com with SMTP id o10so5074933lbi.34\r
+       for <notmuch@notmuchmail.org>; Sun, 07 Apr 2013 10:15:14 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+       :references:in-reply-to:references:x-gm-message-state;\r
+       bh=fqE4VPCPzaF3GJEwOI/J9ja4ER0FF0lP+0diC0y52pw=;\r
+       b=SQNTu2U2XcQMDusiqQJgS+yXwn4Ys//G+MeK/5X/okBeje20fKFAwkRB4oyqQAJRY7\r
+       UF1BA0Ozwf/yxz1tKoVGSbxFXyayXhdSkybgbiwU5D5EJrN/41NHCqqINsGbnj520otd\r
+       wiThWNXNPPPH5Lcy0jtvPRrHTQNnhM/Cj5BFq8kFXEZyqfNTBa6AvAICHEMtHkiovxA6\r
+       sCXKJL9QlOWC4XTxAuoERTKtmwbeCHBD8KYNYzBFW6f5UePJGl0Wh4WUk/EsbAxh+pT7\r
+       mEF06AE6ehGSXkQAzFaWbBfOeiZtyIs7V4mqoxVKRq157QFjVUKyyvcR9jFZzANPbvrN\r
+       cgHA==\r
+X-Received: by 10.112.136.33 with SMTP id px1mr10053885lbb.95.1365354914560;\r
+       Sun, 07 Apr 2013 10:15:14 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id fz10sm9242914lbb.12.2013.04.07.10.15.12\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 07 Apr 2013 10:15:13 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] test: add some config file tests\r
+Date: Sun,  7 Apr 2013 20:15:02 +0300\r
+Message-Id:\r
+ <87ee5b9e61e0b4630d3fa2437d1391438184a674.1365354320.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1365354320.git.jani@nikula.org>\r
+References: <cover.1365354320.git.jani@nikula.org>\r
+In-Reply-To: <cover.1365354320.git.jani@nikula.org>\r
+References: <cover.1365354320.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQlaxxj9UT56UR6IZVzhdOiz8GCd1vvDvLGIl9ARc+k0UC1HHRVItrTDwIZSFOeJsCuLFVii\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\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: Sun, 07 Apr 2013 17:15:22 -0000\r
+\r
+Test the --config=FILE option, and add a broken test for writing\r
+config file through a symbolic link.\r
+---\r
+ test/config |   24 ++++++++++++++++++++++++\r
+ 1 file changed, 24 insertions(+)\r
+\r
+diff --git a/test/config b/test/config\r
+index cfa1f32..344eced 100755\r
+--- a/test/config\r
++++ b/test/config\r
+@@ -57,4 +57,28 @@ maildir.synchronize_flags=true\r
+ foo.string=this is another string value\r
+ foo.list=this;is another;list value;"\r
\r
++test_begin_subtest "Top level --config=FILE option"\r
++cp "${NOTMUCH_CONFIG}" alt-config\r
++notmuch --config=alt-config config set user.name "Another Name"\r
++test_expect_equal "$(notmuch --config=alt-config config get user.name)" \\r
++    "Another Name"\r
++\r
++test_begin_subtest "Top level --config=FILE option changed the right file"\r
++test_expect_equal "$(notmuch config get user.name)" \\r
++    "Notmuch Test Suite"\r
++\r
++test_begin_subtest "Read config file through a symlink"\r
++ln -s alt-config alt-config-link\r
++test_expect_equal "$(notmuch --config=alt-config-link config get user.name)" \\r
++    "Another Name"\r
++\r
++test_begin_subtest "Write config file through a symlink"\r
++notmuch --config=alt-config-link config set user.name "Link Name"\r
++test_expect_equal "$(notmuch --config=alt-config-link config get user.name)" \\r
++    "Link Name"\r
++\r
++test_begin_subtest "Writing config file through symlink follows symlink"\r
++test_subtest_known_broken\r
++test_expect_equal "$(readlink alt-config-link)" "alt-config"\r
++\r
+ test_done\r
+-- \r
+1.7.10.4\r
+\r