[PATCH] test: conditionally test help system depending on configured support
authorJani Nikula <jani@nikula.org>
Wed, 26 Mar 2014 08:48:12 +0000 (09:48 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:00 +0000 (10:01 -0800)
75/53adf43d9cea4b0bf1723cc4dd33caf8ded5c9 [new file with mode: 0644]

diff --git a/75/53adf43d9cea4b0bf1723cc4dd33caf8ded5c9 b/75/53adf43d9cea4b0bf1723cc4dd33caf8ded5c9
new file mode 100644 (file)
index 0000000..4bbbc1f
--- /dev/null
@@ -0,0 +1,121 @@
+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 11193431FBF\r
+       for <notmuch@notmuchmail.org>; Wed, 26 Mar 2014 01:48:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 Lr2013GymXSH for <notmuch@notmuchmail.org>;\r
+       Wed, 26 Mar 2014 01:48:17 -0700 (PDT)\r
+Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com\r
+ [74.125.82.41])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ C60B8431FBD   for <notmuch@notmuchmail.org>; Wed, 26 Mar 2014 01:48:16 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f41.google.com with SMTP id n12so1056846wgh.0\r
+       for <notmuch@notmuchmail.org>; Wed, 26 Mar 2014 01:48:14 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+       bh=ewpgj3lEqjFw/fwnOi8el2jizbWQtCmLjXVvOBJ5EUs=;\r
+       b=dXLMJ9nGJh/Vr6rZMD+0g14K+Nar+fjxE01sNir7upPeIQOwEyptXw0D7AN2UMguri\r
+       ZdQzLbaREkb7tSZ3Iaiz9Qx/Oo6TzsnutKjStXq27xJbzEAvaKNdsEsHEB6gsrmmNMRg\r
+       +SLOZ32Id/qNunUsDMt0sSYU2A4Xmgn5fJy6Q7GKfXSMTTnFsXgXkwvwpOudF1R1d2kn\r
+       8iP63IhR7S6AZ+cQUMDQrqIO8wsJpVVHszgum8fA6hXXVLICBysVUYsZReNIa7a8txf6\r
+       qgIa0NXblX+f+/iyRAk8zA5yXceKN5btlCrNCpNBe++LgjK6A2NSISiDG2X7dBgcShBB\r
+       0fIA==\r
+X-Gm-Message-State:\r
+ ALoCoQlYIbF7CIj/3rylKShmi/CJlJ00FEeGWbVoNr8JYOID4q8uLXJB026tAPyX6m+ahZ7w7pXo\r
+X-Received: by 10.180.8.170 with SMTP id s10mr29119522wia.35.1395823694018;\r
+       Wed, 26 Mar 2014 01:48:14 -0700 (PDT)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+       by mx.google.com with ESMTPSA id w10sm754158wiy.9.2014.03.26.01.48.12\r
+       for <multiple recipients>\r
+       (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+       Wed, 26 Mar 2014 01:48:13 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org,\r
+       david@tethera.net\r
+Subject: [PATCH] test: conditionally test help system depending on configured\r
+       support\r
+Date: Wed, 26 Mar 2014 09:48:12 +0100\r
+Message-Id: <1395823692-30311-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.2.5\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: Wed, 26 Mar 2014 08:48:22 -0000\r
+\r
+If neither sphinx nor rst2man is available, the notmuch man pages will\r
+not be available. Take this into account in the help system test.\r
+---\r
+ test/Makefile.local    |    8 ++++++++\r
+ test/T010-help-test.sh |   12 ++++++++++--\r
+ 2 files changed, 18 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/test/Makefile.local b/test/Makefile.local\r
+index 2b18bdb..987441f 100644\r
+--- a/test/Makefile.local\r
++++ b/test/Makefile.local\r
+@@ -42,10 +42,18 @@ else\r
+       ln -sf /bin/false $@\r
+ endif\r
\r
++$(dir)/have-man: Makefile.config\r
++ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)\r
++      ln -sf /bin/false $@\r
++else\r
++      ln -sf /bin/true $@\r
++endif\r
++\r
+ .PHONY: test check\r
\r
+ TEST_BINARIES=$(dir)/arg-test \\r
+             $(dir)/have-compact \\r
++            $(dir)/have-man \\r
+             $(dir)/hex-xcode \\r
+             $(dir)/random-corpus \\r
+             $(dir)/parse-time \\r
+diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh\r
+index f7df725..77410bc 100755\r
+--- a/test/T010-help-test.sh\r
++++ b/test/T010-help-test.sh\r
+@@ -4,9 +4,17 @@ test_description="online help"\r
+ . ./test-lib.sh\r
\r
+ test_expect_success 'notmuch --help' 'notmuch --help'\r
+-test_expect_success 'notmuch --help tag' 'notmuch --help tag'\r
+ test_expect_success 'notmuch help' 'notmuch help'\r
+-test_expect_success 'notmuch help tag' 'notmuch help tag'\r
+ test_expect_success 'notmuch --version' 'notmuch --version'\r
\r
++if ${TEST_DIRECTORY}/have-man; then\r
++    test_expect_success 'notmuch --help tag' 'notmuch --help tag'\r
++    test_expect_success 'notmuch help tag' 'notmuch help tag'\r
++else\r
++    test_expect_success 'notmuch --help tag (man pages not available)' \\r
++      'test_must_fail notmuch --help tag'\r
++    test_expect_success 'notmuch help tag (man pages not available)' \\r
++      'test_must_fail notmuch help tag'\r
++fi\r
++\r
+ test_done\r
+-- \r
+1.7.2.5\r
+\r