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 A039F431FBD for ; Sun, 13 Apr 2014 05:43:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 aqvPe9rUHKaL for ; Sun, 13 Apr 2014 05:42:58 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 23A0F431FBC for ; Sun, 13 Apr 2014 05:42:58 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WZJkN-0004Wz-HV; Sun, 13 Apr 2014 09:42:55 -0300 Received: (nullmailer pid 8801 invoked by uid 1000); Sun, 13 Apr 2014 12:42:51 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] test: use test_expect_equal for PATH test, update message Date: Sun, 13 Apr 2014 09:42:49 -0300 Message-Id: <1397392969-8735-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.9.1 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, 13 Apr 2014 12:43:03 -0000 - The old test was quite impossible to debug; the new one shows the difference between the two directories, if any. - "repository" doesn't make sense for out of tree builds. Or tarball builds, for that matter. --- I was tracking down a weird issue with out of tree builds. I didn't find the issue (it may have just been cruft from a previously broken build). In any case, I think the patch is a small improvement. test/T000-basic.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/T000-basic.sh b/test/T000-basic.sh index 9c94b62..ebbb6d2 100755 --- a/test/T000-basic.sh +++ b/test/T000-basic.sh @@ -86,8 +86,9 @@ test_expect_success \ 'NOTMUCH_CONFIG is set and points to an existing file' \ 'test -f "${NOTMUCH_CONFIG}"' -test_expect_success \ - 'PATH is set to this repository' \ - 'test "`echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,'`" = "`dirname ${TEST_DIRECTORY}`"' +test_begin_subtest 'PATH is set to build directory' +test_expect_equal \ + "$(dirname ${TEST_DIRECTORY})" \ + "$(echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,')" test_done -- 1.9.1