[PATCH] test: use test_expect_equal for PATH test, update message
Tomi Ollila
tomi.ollila at iki.fi
Sun Apr 13 05:49:06 PDT 2014
On Sun, Apr 13 2014, David Bremner <david at tethera.net> wrote:
> - 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.
> ---
Looks better than the old one. +1
Tomi
>
> 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
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list