]> git.notmuchmail.org Git - notmuch/commitdiff
test: use test_expect_equal for PATH test, update message
authorDavid Bremner <david@tethera.net>
Sun, 13 Apr 2014 12:42:49 +0000 (09:42 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 17 Apr 2014 22:53:57 +0000 (07:53 +0900)
- 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.

test/T000-basic.sh

index 9c94b62c99df3d4e0cba2d74231e85a9d2355540..ebbb6d2ecd995a2447609e119c220ca135f00d8b 100755 (executable)
@@ -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