aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-09-25 23:38:19 +0300
committerDavid Bremner <david@tethera.net>2017-10-20 19:52:49 -0300
commita863de1e43ee34f6f5794a2759fdceb287e851aa (patch)
tree3e3b39e88ef26ea1952afdfca42134e3944d7fec
parent0dd58ea7e7f2af3fea2ba747a49c1d8bb3cdeaad (diff)
test: use $(dirname "$0") for sourcing test-lib.sh
Don't assume the tests are always run from within the source tree.
-rwxr-xr-xtest/T000-basic.sh2
-rwxr-xr-xtest/T010-help-test.sh2
-rwxr-xr-xtest/T020-compact.sh2
-rwxr-xr-xtest/T030-config.sh2
-rwxr-xr-xtest/T040-setup.sh2
-rwxr-xr-xtest/T050-new.sh2
-rwxr-xr-xtest/T060-count.sh2
-rwxr-xr-xtest/T070-insert.sh2
-rwxr-xr-xtest/T080-search.sh2
-rwxr-xr-xtest/T090-search-output.sh2
-rwxr-xr-xtest/T095-address.sh2
-rwxr-xr-xtest/T100-search-by-folder.sh2
-rwxr-xr-xtest/T110-search-position-overlap-bug.sh2
-rwxr-xr-xtest/T120-search-insufficient-from-quoting.sh2
-rwxr-xr-xtest/T130-search-limiting.sh2
-rwxr-xr-xtest/T140-excludes.sh2
-rwxr-xr-xtest/T150-tagging.sh2
-rwxr-xr-xtest/T160-json.sh2
-rwxr-xr-xtest/T170-sexp.sh2
-rwxr-xr-xtest/T180-text.sh2
-rwxr-xr-xtest/T190-multipart.sh2
-rwxr-xr-xtest/T200-thread-naming.sh2
-rwxr-xr-xtest/T205-author-naming.sh2
-rwxr-xr-xtest/T210-raw.sh2
-rwxr-xr-xtest/T220-reply.sh2
-rwxr-xr-xtest/T230-reply-to-sender.sh2
-rwxr-xr-xtest/T240-dump-restore.sh2
-rwxr-xr-xtest/T250-uuencode.sh2
-rwxr-xr-xtest/T260-thread-order.sh2
-rwxr-xr-xtest/T270-author-order.sh2
-rwxr-xr-xtest/T280-from-guessing.sh2
-rwxr-xr-xtest/T290-long-id.sh2
-rwxr-xr-xtest/T300-encoding.sh2
-rwxr-xr-xtest/T310-emacs.sh2
-rwxr-xr-xtest/T320-emacs-large-search-buffer.sh2
-rwxr-xr-xtest/T330-emacs-subject-to-filename.sh2
-rwxr-xr-xtest/T340-maildir-sync.sh2
-rwxr-xr-xtest/T350-crypto.sh2
-rwxr-xr-xtest/T355-smime.sh2
-rwxr-xr-xtest/T360-symbol-hiding.sh2
-rwxr-xr-xtest/T370-search-folder-coherence.sh2
-rwxr-xr-xtest/T380-atomicity.sh2
-rwxr-xr-xtest/T390-python.sh2
-rwxr-xr-xtest/T395-ruby.sh2
-rwxr-xr-xtest/T400-hooks.sh2
-rwxr-xr-xtest/T410-argument-parsing.sh2
-rwxr-xr-xtest/T420-emacs-test-functions.sh2
-rwxr-xr-xtest/T430-emacs-address-cleaning.sh2
-rwxr-xr-xtest/T440-emacs-hello.sh2
-rwxr-xr-xtest/T450-emacs-show.sh2
-rwxr-xr-xtest/T455-emacs-charsets.sh2
-rwxr-xr-xtest/T460-emacs-tree.sh2
-rwxr-xr-xtest/T470-missing-headers.sh2
-rwxr-xr-xtest/T480-hex-escaping.sh2
-rwxr-xr-xtest/T490-parse-time-string.sh2
-rwxr-xr-xtest/T500-search-date.sh2
-rwxr-xr-xtest/T510-thread-replies.sh2
-rwxr-xr-xtest/T520-show.sh2
-rwxr-xr-xtest/T530-upgrade.sh2
-rwxr-xr-xtest/T550-db-features.sh2
-rwxr-xr-xtest/T560-lib-error.sh2
-rwxr-xr-xtest/T570-revision-tracking.sh2
-rwxr-xr-xtest/T580-thread-search.sh2
-rwxr-xr-xtest/T590-libconfig.sh2
-rwxr-xr-xtest/T590-thread-breakage.sh2
-rwxr-xr-xtest/T600-named-queries.sh2
-rwxr-xr-xtest/T610-message-property.sh2
-rwxr-xr-xtest/T620-lock.sh2
-rwxr-xr-xtest/T630-emacs-draft.sh2
-rwxr-xr-xtest/T640-database-modified.sh2
-rwxr-xr-xtest/T650-regexp-query.sh2
-rwxr-xr-xtest/T660-bad-date.sh2
-rwxr-xr-xtest/T670-duplicate-mid.sh2
-rwxr-xr-xtest/T680-html-indexing.sh2
-rwxr-xr-xtest/T690-command-line-args.sh2
-rwxr-xr-xtest/T700-reindex.sh2
-rwxr-xr-xtest/test-verbose2
77 files changed, 77 insertions, 77 deletions
diff --git a/test/T000-basic.sh b/test/T000-basic.sh
index a4efa3ca..d514082d 100755
--- a/test/T000-basic.sh
+++ b/test/T000-basic.sh
@@ -14,7 +14,7 @@ then
exit 1
fi
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
################################################################
# Test harness
diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh
index 0c833de2..da45d3ae 100755
--- a/test/T010-help-test.sh
+++ b/test/T010-help-test.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="online help"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest 'notmuch --help'
test_expect_success 'notmuch --help'
diff --git a/test/T020-compact.sh b/test/T020-compact.sh
index a3d7380e..58cd2ba7 100755
--- a/test/T020-compact.sh
+++ b/test/T020-compact.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch compact"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message '[subject]=One'
add_message '[subject]=Two'
diff --git a/test/T030-config.sh b/test/T030-config.sh
index 35d757f6..e91c3659 100755
--- a/test/T030-config.sh
+++ b/test/T030-config.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description='"notmuch config"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Get string value"
test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
diff --git a/test/T040-setup.sh b/test/T040-setup.sh
index 998bd6e0..56efe1d5 100755
--- a/test/T040-setup.sh
+++ b/test/T040-setup.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description='"notmuch setup"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Notmuch new without a config suggests notmuch setup"
output=$(notmuch --config=new-notmuch-config new 2>&1)
diff --git a/test/T050-new.sh b/test/T050-new.sh
index 272ed417..2035d29f 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch new" in several variations'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "No new messages"
output=$(NOTMUCH_NEW --debug)
diff --git a/test/T060-count.sh b/test/T060-count.sh
index 4751440e..0c0bf473 100755
--- a/test/T060-count.sh
+++ b/test/T060-count.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch count" for messages and threads'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index e56a9d21..f1650e62 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch insert"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_require_external_prereq gdb
diff --git a/test/T080-search.sh b/test/T080-search.sh
index 3bb3dced..70f28549 100755
--- a/test/T080-search.sh
+++ b/test/T080-search.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch search" in several variations'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh
index dccefcb7..bf28d220 100755
--- a/test/T090-search-output.sh
+++ b/test/T090-search-output.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='various settings for "notmuch search --output="'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T095-address.sh b/test/T095-address.sh
index 5931b147..f0291d29 100755
--- a/test/T095-address.sh
+++ b/test/T095-address.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch address" in several variants'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T100-search-by-folder.sh b/test/T100-search-by-folder.sh
index 79c266e4..a090f3d2 100755
--- a/test/T100-search-by-folder.sh
+++ b/test/T100-search-by-folder.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch search" by folder: and path: (with variations)'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message '[dir]=bad' '[subject]="To the bone"'
add_message '[dir]=.' '[subject]="Top level"'
diff --git a/test/T110-search-position-overlap-bug.sh b/test/T110-search-position-overlap-bug.sh
index 2a4238f9..f4d5ee14 100755
--- a/test/T110-search-position-overlap-bug.sh
+++ b/test/T110-search-position-overlap-bug.sh
@@ -18,7 +18,7 @@
# id:3wd4o8wa7fx.fsf@testarossa.amd.com
test_description='that notmuch does not overlap term positions'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message '[to]="a@b.c, x@y.z"'
diff --git a/test/T120-search-insufficient-from-quoting.sh b/test/T120-search-insufficient-from-quoting.sh
index 4862d826..509fec8b 100755
--- a/test/T120-search-insufficient-from-quoting.sh
+++ b/test/T120-search-insufficient-from-quoting.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='messages with unquoted . in name'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message \
'[from]="Some.Name for Someone <bugs@quoting.com>"' \
diff --git a/test/T130-search-limiting.sh b/test/T130-search-limiting.sh
index c8986f4e..8a30e7ab 100755
--- a/test/T130-search-limiting.sh
+++ b/test/T130-search-limiting.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch search" --offset and --limit parameters'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T140-excludes.sh b/test/T140-excludes.sh
index f91d4d7f..0cf69975 100755
--- a/test/T140-excludes.sh
+++ b/test/T140-excludes.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch search, count and show" with excludes in several variations'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# Generates a thread consisting of a top level message and 'length'
# replies. The subject of the top message 'subject: top message"
diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh
index 0d0a3b87..6140c676 100755
--- a/test/T150-tagging.sh
+++ b/test/T150-tagging.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='"notmuch tag"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message '[subject]=One'
add_message '[subject]=Two'
diff --git a/test/T160-json.sh b/test/T160-json.sh
index 07955a2b..765b78a6 100755
--- a/test/T160-json.sh
+++ b/test/T160-json.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="--format=json output"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Show message: json"
add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"json-show-message\""
diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh
index db142e49..1125fdc9 100755
--- a/test/T170-sexp.sh
+++ b/test/T170-sexp.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="--format=sexp output"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Show message: sexp"
add_message "[subject]=\"sexp-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"sexp-show-message\""
diff --git a/test/T180-text.sh b/test/T180-text.sh
index 3a265dbd..ad2cb1f3 100755
--- a/test/T180-text.sh
+++ b/test/T180-text.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="--format=text output"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Show message: text"
add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\""
diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh
index 94bb0570..f73535b7 100755
--- a/test/T190-multipart.sh
+++ b/test/T190-multipart.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="output of multipart message"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
cat <<EOF > embedded_message_body
Content-Type: multipart/alternative; boundary="==-=-=="
diff --git a/test/T200-thread-naming.sh b/test/T200-thread-naming.sh
index 2167ba8e..594d301f 100755
--- a/test/T200-thread-naming.sh
+++ b/test/T200-thread-naming.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="naming of threads with changing subject"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Initial thread name (oldest-first search)"
add_message '[subject]="thread-naming: Initial thread subject"' \
diff --git a/test/T205-author-naming.sh b/test/T205-author-naming.sh
index 69d8dc50..68b85ced 100755
--- a/test/T205-author-naming.sh
+++ b/test/T205-author-naming.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="naming of authors with unusual addresses"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Add author with empty quoted real name"
add_message '[subject]="author-naming: Initial thread subject"' \
diff --git a/test/T210-raw.sh b/test/T210-raw.sh
index 832a4ad3..99fdef72 100755
--- a/test/T210-raw.sh
+++ b/test/T210-raw.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description='notmuch show --format=raw'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message
add_message
diff --git a/test/T220-reply.sh b/test/T220-reply.sh
index 4fb67ffb..ebe710f9 100755
--- a/test/T220-reply.sh
+++ b/test/T220-reply.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="\"notmuch reply\" in several variations"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Basic reply"
add_message '[from]="Sender <sender@example.com>"' \
diff --git a/test/T230-reply-to-sender.sh b/test/T230-reply-to-sender.sh
index 608334dc..134a1063 100755
--- a/test/T230-reply-to-sender.sh
+++ b/test/T230-reply-to-sender.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="\"notmuch reply --reply-to=sender\" in several variations"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Basic reply-to-sender"
add_message '[from]="Sender <sender@example.com>"' \
diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh
index 75fb0b40..0870ff92 100755
--- a/test/T240-dump-restore.sh
+++ b/test/T240-dump-restore.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="\"notmuch dump\" and \"notmuch restore\""
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
NOTMUCH_NEW > /dev/null
test_begin_subtest "dump header"
diff --git a/test/T250-uuencode.sh b/test/T250-uuencode.sh
index 6f45d395..251c0b40 100755
--- a/test/T250-uuencode.sh
+++ b/test/T250-uuencode.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="handling of uuencoded data"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message [subject]=uuencodetest '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
'[body]="This message is used to ensure that notmuch correctly handles a
diff --git a/test/T260-thread-order.sh b/test/T260-thread-order.sh
index 89f4d1be..7f71ce09 100755
--- a/test/T260-thread-order.sh
+++ b/test/T260-thread-order.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="threading when messages received out of order"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# Generate all single-root four message thread structures. We'll use
# this for multiple tests below.
diff --git a/test/T270-author-order.sh b/test/T270-author-order.sh
index 9124ece6..c28ecb02 100755
--- a/test/T270-author-order.sh
+++ b/test/T270-author-order.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="author reordering;"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Adding parent message"
generate_message [body]=findme [id]=new-parent-id [subject]=author-reorder-threadtest '[from]="User <user@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
diff --git a/test/T280-from-guessing.sh b/test/T280-from-guessing.sh
index 7c562fb9..b8718232 100755
--- a/test/T280-from-guessing.sh
+++ b/test/T280-from-guessing.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="From line heuristics (with multiple configured addresses)"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Magic from guessing (nothing to go on)"
add_message '[from]="Sender <sender@example.com>"' \
diff --git a/test/T290-long-id.sh b/test/T290-long-id.sh
index 1fb7c037..5e3879f5 100755
--- a/test/T290-long-id.sh
+++ b/test/T290-long-id.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="messages with ridiculously-long message IDs"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Referencing long ID before adding"
generate_message '[subject]="Reference of ridiculously-long message ID"' \
diff --git a/test/T300-encoding.sh b/test/T300-encoding.sh
index 8d201c7e..2c656a1e 100755
--- a/test/T300-encoding.sh
+++ b/test/T300-encoding.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="encoding issues"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Message with text of unknown charset"
add_message '[content-type]="text/plain; charset=unknown-8bit"' \
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 4456bc65..8c738c47 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs interface"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
diff --git a/test/T320-emacs-large-search-buffer.sh b/test/T320-emacs-large-search-buffer.sh
index e9d5e358..f61e8a97 100755
--- a/test/T320-emacs-large-search-buffer.sh
+++ b/test/T320-emacs-large-search-buffer.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="Emacs with large search results buffer"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
x=xxxxxxxxxx # 10
x=$x$x$x$x$x$x$x$x$x$x # 100
diff --git a/test/T330-emacs-subject-to-filename.sh b/test/T330-emacs-subject-to-filename.sh
index 517fa839..eaf7c980 100755
--- a/test/T330-emacs-subject-to-filename.sh
+++ b/test/T330-emacs-subject-to-filename.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs: mail subject to filename"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# emacs server can't be started in a child process with $(test_emacs ...)
test_emacs '(ignore)' > /dev/null
diff --git a/test/T340-maildir-sync.sh b/test/T340-maildir-sync.sh
index b473ae4e..7fece5f2 100755
--- a/test/T340-maildir-sync.sh
+++ b/test/T340-maildir-sync.sh
@@ -2,7 +2,7 @@
test_description="maildir synchronization"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# Create the expected maildir structure
mkdir $MAIL_DIR/cur
diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
index 401a22c9..38615677 100755
--- a/test/T350-crypto.sh
+++ b/test/T350-crypto.sh
@@ -5,7 +5,7 @@
# - verification of signatures from expired/revoked keys
test_description='PGP/MIME signature verification and decryption'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
##################################################
diff --git a/test/T355-smime.sh b/test/T355-smime.sh
index 03d24581..b813b6ca 100755
--- a/test/T355-smime.sh
+++ b/test/T355-smime.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description='S/MIME signature verification and decryption'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_gpgsm_home ()
{
diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
index 9c6d4e64..68edc2d3 100755
--- a/test/T360-symbol-hiding.sh
+++ b/test/T360-symbol-hiding.sh
@@ -9,7 +9,7 @@
test_description='exception symbol hiding'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest 'running test' run_test
mkdir -p ${PWD}/fakedb/.notmuch
diff --git a/test/T370-search-folder-coherence.sh b/test/T370-search-folder-coherence.sh
index 8748b3d0..0a2727e7 100755
--- a/test/T370-search-folder-coherence.sh
+++ b/test/T370-search-folder-coherence.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='folder tags removed and added through file renames remain consistent'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "No new messages"
output=$(NOTMUCH_NEW)
diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
index a46a2df2..17a3e478 100755
--- a/test/T380-atomicity.sh
+++ b/test/T380-atomicity.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='atomicity'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# This script tests the effects of killing and restarting "notmuch
# new" at arbitrary points. If notmuch new is properly atomic, the
diff --git a/test/T390-python.sh b/test/T390-python.sh
index 5921cac9..a93a7f34 100755
--- a/test/T390-python.sh
+++ b/test/T390-python.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="python bindings"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_require_external_prereq ${NOTMUCH_PYTHON}
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 52f9fe0f..a0b76eb8 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="ruby bindings"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
test_subtest_missing_external_prereq_["ruby development files"]=t
diff --git a/test/T400-hooks.sh b/test/T400-hooks.sh
index 7917a82f..49c690eb 100755
--- a/test/T400-hooks.sh
+++ b/test/T400-hooks.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='hooks'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
HOOK_DIR=${MAIL_DIR}/.notmuch/hooks
diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh
index 4a2b25c6..71ed7e38 100755
--- a/test/T410-argument-parsing.sh
+++ b/test/T410-argument-parsing.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="argument parsing"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "sanity check"
$TEST_DIRECTORY/arg-test pos1 --keyword=one --boolean --string=foo pos2 --int=7 --flag=one --flag=three > OUTPUT
diff --git a/test/T420-emacs-test-functions.sh b/test/T420-emacs-test-functions.sh
index 955c5f7f..bfc10be3 100755
--- a/test/T420-emacs-test-functions.sh
+++ b/test/T420-emacs-test-functions.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs test function sanity"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "emacs test function sanity"
test_emacs_expect_t 't'
diff --git a/test/T430-emacs-address-cleaning.sh b/test/T430-emacs-address-cleaning.sh
index 664b79d2..02d3b411 100755
--- a/test/T430-emacs-address-cleaning.sh
+++ b/test/T430-emacs-address-cleaning.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs address cleaning"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "notmuch-test-address-clean part 1"
test_emacs_expect_t '(notmuch-test-address-cleaning-1)'
diff --git a/test/T440-emacs-hello.sh b/test/T440-emacs-hello.sh
index ac214a5b..76e79593 100755
--- a/test/T440-emacs-hello.sh
+++ b/test/T440-emacs-hello.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs notmuch-hello view"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index db48c7d5..95babb1f 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs notmuch-show view"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output
diff --git a/test/T455-emacs-charsets.sh b/test/T455-emacs-charsets.sh
index 5d6d53a8..cb1297ca 100755
--- a/test/T455-emacs-charsets.sh
+++ b/test/T455-emacs-charsets.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs notmuch-show charset handling"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
UTF8_YEN=$'\xef\xbf\xa5'
diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh
index 958ff888..dc597841 100755
--- a/test/T460-emacs-tree.sh
+++ b/test/T460-emacs-tree.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="emacs tree view interface"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
EXPECTED=$TEST_DIRECTORY/tree.expected-output
diff --git a/test/T470-missing-headers.sh b/test/T470-missing-headers.sh
index 32031e31..4bf5d285 100755
--- a/test/T470-missing-headers.sh
+++ b/test/T470-missing-headers.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='messages with missing headers'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# Notmuch requires at least one of from, subject, or to or it will
# ignore the file. Generate two messages so that together they cover
diff --git a/test/T480-hex-escaping.sh b/test/T480-hex-escaping.sh
index 18b56600..28564c3c 100755
--- a/test/T480-hex-escaping.sh
+++ b/test/T480-hex-escaping.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="hex encoding and decoding"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "round trip"
find $TEST_DIRECTORY/corpora/default -type f -print | sort | xargs cat > EXPECTED
diff --git a/test/T490-parse-time-string.sh b/test/T490-parse-time-string.sh
index ab90fcc5..d1c70cfa 100755
--- a/test/T490-parse-time-string.sh
+++ b/test/T490-parse-time-string.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="date/time parser module"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# Sanity/smoke tests for the date/time parser independent of notmuch
diff --git a/test/T500-search-date.sh b/test/T500-search-date.sh
index fc4ecdc3..5c5b99a0 100755
--- a/test/T500-search-date.sh
+++ b/test/T500-search-date.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="date:since..until queries"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh
index fa288bb1..6837ff17 100755
--- a/test/T510-thread-replies.sh
+++ b/test/T510-thread-replies.sh
@@ -9,7 +9,7 @@ test_description='test of proper handling of in-reply-to and references headers'
# database is constructed properly, even in the presence of
# non-RFC-compliant headers'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "Use References when In-Reply-To is broken"
add_message '[id]="foo@one.com"' \
diff --git a/test/T520-show.sh b/test/T520-show.sh
index fb232a32..16222650 100755
--- a/test/T520-show.sh
+++ b/test/T520-show.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description='"notmuch show"'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh
index f0fd1511..69ebec68 100755
--- a/test/T530-upgrade.sh
+++ b/test/T530-upgrade.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="database upgrade"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
dbtarball=database-v1.tar.xz
diff --git a/test/T550-db-features.sh b/test/T550-db-features.sh
index f94a660d..9d5a9e70 100755
--- a/test/T550-db-features.sh
+++ b/test/T550-db-features.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="database version and feature compatibility"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "future database versions abort open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 9999 ""
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index a50eca80..06a6b860 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="error reporting for library"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T570-revision-tracking.sh b/test/T570-revision-tracking.sh
index 76ad2279..a59e7c98 100755
--- a/test/T570-revision-tracking.sh
+++ b/test/T570-revision-tracking.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="database revision tracking"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T580-thread-search.sh b/test/T580-thread-search.sh
index 512559a3..01aa3efd 100755
--- a/test/T580-thread-search.sh
+++ b/test/T580-thread-search.sh
@@ -5,7 +5,7 @@
test_description='test of searching by thread-id'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
index 1b308693..46f3a76d 100755
--- a/test/T590-libconfig.sh
+++ b/test/T590-libconfig.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="library config API"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T590-thread-breakage.sh b/test/T590-thread-breakage.sh
index 38abc211..53932d63 100755
--- a/test/T590-thread-breakage.sh
+++ b/test/T590-thread-breakage.sh
@@ -19,7 +19,7 @@ test_description='thread breakage during reindexing'
# works properly and attempted fixes to threading issues do not break
# the expected contents of the index.
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
message_a() {
mkdir -p ${MAIL_DIR}/cur
diff --git a/test/T600-named-queries.sh b/test/T600-named-queries.sh
index 495b7699..59496c3e 100755
--- a/test/T600-named-queries.sh
+++ b/test/T600-named-queries.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='named queries'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
QUERYSTR="date:2009-11-18..2009-11-18 and tag:unread"
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index ba5f55da..74b3f5a1 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="message property API"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T620-lock.sh b/test/T620-lock.sh
index f46475e8..085ffe43 100755
--- a/test/T620-lock.sh
+++ b/test/T620-lock.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="locking"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
if [ "${NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK}" = "0" ]; then
test_subtest_missing_external_prereq_["lock retry support"]=t
diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh
index cd9e33a7..d7903ce7 100755
--- a/test/T630-emacs-draft.sh
+++ b/test/T630-emacs-draft.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="Emacs Draft Handling"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/T640-database-modified.sh b/test/T640-database-modified.sh
index e35e35f6..274105c7 100755
--- a/test/T640-database-modified.sh
+++ b/test/T640-database-modified.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="DatabaseModifiedError handling"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
# add enough messages to trigger the exception
add_email_corpus
diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
index d5def764..4085340f 100755
--- a/test/T650-regexp-query.sh
+++ b/test/T650-regexp-query.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='regular expression searches'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
test_done
diff --git a/test/T660-bad-date.sh b/test/T660-bad-date.sh
index a98e11c8..f65544b9 100755
--- a/test/T660-bad-date.sh
+++ b/test/T660-bad-date.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="parsing of bad dates"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message [date]='"()"'
diff --git a/test/T670-duplicate-mid.sh b/test/T670-duplicate-mid.sh
index 21a9689a..c198c506 100755
--- a/test/T670-duplicate-mid.sh
+++ b/test/T670-duplicate-mid.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="duplicate message ids"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message '[id]="duplicate"' '[subject]="message 1" [filename]=copy1'
add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
diff --git a/test/T680-html-indexing.sh b/test/T680-html-indexing.sh
index 74f33708..62ba8498 100755
--- a/test/T680-html-indexing.sh
+++ b/test/T680-html-indexing.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description="indexing of html parts"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus html
diff --git a/test/T690-command-line-args.sh b/test/T690-command-line-args.sh
index a4f4b5f5..9aa47611 100755
--- a/test/T690-command-line-args.sh
+++ b/test/T690-command-line-args.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="command line arguments"
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_message
diff --git a/test/T700-reindex.sh b/test/T700-reindex.sh
index 051fbb3c..2b7bc658 100755
--- a/test/T700-reindex.sh
+++ b/test/T700-reindex.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
test_description='reindexing messages'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
diff --git a/test/test-verbose b/test/test-verbose
index 158be28a..8af6d9a9 100755
--- a/test/test-verbose
+++ b/test/test-verbose
@@ -2,7 +2,7 @@
test_description='the verbosity options of the test framework itself.'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest 'print something in test_expect_success and pass'
test_expect_success '