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