aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorGravatar Mike Kelly <pioto@pioto.org>2012-05-30 03:02:00 -0400
committerGravatar David Bremner <bremner@debian.org>2012-09-01 23:16:39 -0300
commitd29ff5699de10394d7fdab41ce1c39e18c736332 (patch)
tree44c704c6af0ce484ccde08b826a2c45cfdcc3c0e /test/test-lib.sh
parent1652ea7d1bdbf5b24b6b493f29a98f475d2d6b66 (diff)
tests: Test against source man pages.
Without this, help-test tests against the installed man pages, rather than the default ones.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 663b18e6..f34b1fb8 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1070,6 +1070,7 @@ find_notmuch_path ()
# Test the binaries we have just built. The tests are kept in
# test/ subdirectory and are run in 'trash directory' subdirectory.
TEST_DIRECTORY=$(pwd)
+notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"`
if test -n "$valgrind"
then
make_symlink () {
@@ -1130,11 +1131,15 @@ then
PATH=$GIT_VALGRIND/bin:$PATH
GIT_EXEC_PATH=$GIT_VALGRIND/bin
export GIT_VALGRIND
+ test -n "$notmuch_path" && MANPATH="$notmuch_path/man:$MANPATH"
else # normal case
- notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"`
- test -n "$notmuch_path" && PATH="$notmuch_path:$PATH"
+ if test -n "$notmuch_path"
+ then
+ PATH="$notmuch_path:$PATH"
+ MANPATH="$notmuch_path/man:$MANPATH"
+ fi
fi
-export PATH
+export PATH MANPATH
# Test repository
test="tmp.$(basename "$0" .sh)"