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