From: Tomi Ollila Date: Wed, 21 Nov 2012 15:16:14 +0000 (+0200) Subject: test: always source test-lib.sh as ./test-lib.sh X-Git-Tag: 0.15_rc1~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3bd8494da0dfef973c1328b16cd848f144e3ac27;p=notmuch.git test: always source test-lib.sh as ./test-lib.sh There are currently 45 TESTS scripts. 36 of those load test-lib.sh using '. ./test-lib.sh' and 9 '. test-lib.sh'. In latter case test-lib.sh is first searched from directories in PATH (posix) and then from current directory (bash feature). Changed the 9 files to execute '. ./test-lib.sh'. The test-lib.sh should never be loaded from directory in PATH. --- diff --git a/test/config b/test/config index 93ecb139..cfa1f327 100755 --- a/test/config +++ b/test/config @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description='"notmuch config"' -. test-lib.sh +. ./test-lib.sh test_begin_subtest "Get string value" test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite" diff --git a/test/emacs b/test/emacs index 5649d55f..74155f8c 100755 --- a/test/emacs +++ b/test/emacs @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs interface" -. test-lib.sh +. ./test-lib.sh EXPECTED=$TEST_DIRECTORY/emacs.expected-output diff --git a/test/emacs-address-cleaning b/test/emacs-address-cleaning index 6ddde5c6..04723467 100755 --- a/test/emacs-address-cleaning +++ b/test/emacs-address-cleaning @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs address cleaning" -. test-lib.sh +. ./test-lib.sh test_begin_subtest "notmuch-test-address-clean part 1" test_emacs_expect_t '(notmuch-test-address-cleaning-1)' diff --git a/test/emacs-hello b/test/emacs-hello index 48d1420f..f7296166 100755 --- a/test/emacs-hello +++ b/test/emacs-hello @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs notmuch-hello view" -. test-lib.sh +. ./test-lib.sh EXPECTED=$TEST_DIRECTORY/emacs.expected-output diff --git a/test/emacs-large-search-buffer b/test/emacs-large-search-buffer index 4351e33e..678328d0 100755 --- a/test/emacs-large-search-buffer +++ b/test/emacs-large-search-buffer @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="Emacs with large search results buffer" -. test-lib.sh +. ./test-lib.sh x=xxxxxxxxxx # 10 x=$x$x$x$x$x$x$x$x$x$x # 100 diff --git a/test/emacs-show b/test/emacs-show index ec3be8b9..b670abf6 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs notmuch-show view" -. test-lib.sh +. ./test-lib.sh EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename index a0ffdfef..43529a48 100755 --- a/test/emacs-subject-to-filename +++ b/test/emacs-subject-to-filename @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs: mail subject to filename" -. test-lib.sh +. ./test-lib.sh # emacs server can't be started in a child process with $(test_emacs ...) test_emacs '(ignore)' diff --git a/test/emacs-test-functions b/test/emacs-test-functions index 0e1f9fc7..ca4a7988 100755 --- a/test/emacs-test-functions +++ b/test/emacs-test-functions @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="emacs test function sanity" -. test-lib.sh +. ./test-lib.sh test_begin_subtest "emacs test function sanity" test_emacs_expect_t 't' diff --git a/test/help-test b/test/help-test index 9f4b9c79..f7df725e 100755 --- a/test/help-test +++ b/test/help-test @@ -1,7 +1,7 @@ #!/usr/bin/env bash test_description="online help" -. test-lib.sh +. ./test-lib.sh test_expect_success 'notmuch --help' 'notmuch --help' test_expect_success 'notmuch --help tag' 'notmuch --help tag'