]> git.notmuchmail.org Git - notmuch/commitdiff
test: use $(dirname "$0") for sourcing test-lib.sh
authorJani Nikula <jani@nikula.org>
Mon, 25 Sep 2017 20:38:19 +0000 (23:38 +0300)
committerDavid Bremner <david@tethera.net>
Fri, 20 Oct 2017 22:52:49 +0000 (19:52 -0300)
Don't assume the tests are always run from within the source tree.

77 files changed:
test/T000-basic.sh
test/T010-help-test.sh
test/T020-compact.sh
test/T030-config.sh
test/T040-setup.sh
test/T050-new.sh
test/T060-count.sh
test/T070-insert.sh
test/T080-search.sh
test/T090-search-output.sh
test/T095-address.sh
test/T100-search-by-folder.sh
test/T110-search-position-overlap-bug.sh
test/T120-search-insufficient-from-quoting.sh
test/T130-search-limiting.sh
test/T140-excludes.sh
test/T150-tagging.sh
test/T160-json.sh
test/T170-sexp.sh
test/T180-text.sh
test/T190-multipart.sh
test/T200-thread-naming.sh
test/T205-author-naming.sh
test/T210-raw.sh
test/T220-reply.sh
test/T230-reply-to-sender.sh
test/T240-dump-restore.sh
test/T250-uuencode.sh
test/T260-thread-order.sh
test/T270-author-order.sh
test/T280-from-guessing.sh
test/T290-long-id.sh
test/T300-encoding.sh
test/T310-emacs.sh
test/T320-emacs-large-search-buffer.sh
test/T330-emacs-subject-to-filename.sh
test/T340-maildir-sync.sh
test/T350-crypto.sh
test/T355-smime.sh
test/T360-symbol-hiding.sh
test/T370-search-folder-coherence.sh
test/T380-atomicity.sh
test/T390-python.sh
test/T395-ruby.sh
test/T400-hooks.sh
test/T410-argument-parsing.sh
test/T420-emacs-test-functions.sh
test/T430-emacs-address-cleaning.sh
test/T440-emacs-hello.sh
test/T450-emacs-show.sh
test/T455-emacs-charsets.sh
test/T460-emacs-tree.sh
test/T470-missing-headers.sh
test/T480-hex-escaping.sh
test/T490-parse-time-string.sh
test/T500-search-date.sh
test/T510-thread-replies.sh
test/T520-show.sh
test/T530-upgrade.sh
test/T550-db-features.sh
test/T560-lib-error.sh
test/T570-revision-tracking.sh
test/T580-thread-search.sh
test/T590-libconfig.sh
test/T590-thread-breakage.sh
test/T600-named-queries.sh
test/T610-message-property.sh
test/T620-lock.sh
test/T630-emacs-draft.sh
test/T640-database-modified.sh
test/T650-regexp-query.sh
test/T660-bad-date.sh
test/T670-duplicate-mid.sh
test/T680-html-indexing.sh
test/T690-command-line-args.sh
test/T700-reindex.sh
test/test-verbose

index a4efa3cab8b5095a0de997497c7d57276b34840e..d514082d48e3b4539759fe6d0fc277b4ba572491 100755 (executable)
@@ -14,7 +14,7 @@ then
        exit 1
 fi
 
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
 
 ################################################################
 # Test harness
index 0c833de262170f5aea7b778aa62bcef0f9ed4d63..da45d3aecf7ae7a0c6e86be06f6d21155c50129b 100755 (executable)
@@ -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'
index a3d7380e81c8c12f1a685ca1f4e61cac292ea63c..58cd2ba74cefd7f9a1b6fa6808be7fd77c424a1c 100755 (executable)
@@ -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'
index 35d757f6b227fc96bab7b32e203d4c0aac925baf..e91c36597e3c1601fc4c9b2346adb587cc7fbea0 100755 (executable)
@@ -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"
index 998bd6e0798a26c0cc23cee47a8cdd8690d66f24..56efe1d57b496536166a8db1d90d3d2bc3b652a1 100755 (executable)
@@ -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)
index 272ed417aa2eb8f4a6f9724b8bb540449f45c7fd..2035d29f529aa8c93922d5f98827fc12c5fd6cec 100755 (executable)
@@ -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)
index 4751440e94a1acf7ef552fd0503be3d4264dbaf7..0c0bf47309e930477f0b69fafeb93130f747fd3c 100755 (executable)
@@ -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
 
index e56a9d21880ee9d093b47e00d9ac014cf1807940..f1650e623e351475d1a0d17b7075f8673e9b3d0b 100755 (executable)
@@ -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
 
index 3bb3dced89159c2d4a5279359498032427bc3ad0..70f2854973a9ca29e1cf0c9d483cf1b00564e7f4 100755 (executable)
@@ -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
 
index dccefcb7f0128b214c6d2d5e74afddacc394f3af..bf28d220a760515bfeeba06a7e2fa92d389ad42b 100755 (executable)
@@ -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
 
index 5931b1475e0b3d7358d84c2692dee3b72f2af517..f0291d29ec43076a3fda9f41ffadb6a6aed2ef43 100755 (executable)
@@ -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
 
index 79c266e445f5fb8968979e65c0bd94dec6afca3c..a090f3d247c418605ee8f80cb59e059386aec690 100755 (executable)
@@ -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"'
index 2a4238f95fc93ca48830b6d13f113bf6fe7b6268..f4d5ee1479bae98b8d52f29682aefa66cc50b271 100755 (executable)
@@ -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"'
 
index 4862d82644df6979b2e84f98d8006fdadf18c957..509fec8b0f2a21e1b632c88f52dac4cffeb0c604 100755 (executable)
@@ -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>"' \
index c8986f4e405795b58cda66553c80e5e9588bcf4a..8a30e7abf87fa84c5c5f31ea49c32ebaace23db9 100755 (executable)
@@ -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
 
index f91d4d7f0cac11bd7282d9b7a8156c1ac6808294..0cf69975f44275c8f43f6939f363fd0111cc649f 100755 (executable)
@@ -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"
index 0d0a3b874526dccd24166066be3767fbe29efea5..6140c67686305f8959bc7398ad819212cfb38ee4 100755 (executable)
@@ -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'
index 07955a2bb90ac8441cdcee5ab3b27d3b9ea910c7..765b78a6746dc84c0b530b44a2bef58005eb5643 100755 (executable)
@@ -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\""
index db142e49683d2279f845b8aa6a3351f1b1d79a60..1125fdc91ec09ff741d5284f38b303f38144f0f7 100755 (executable)
@@ -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\""
index 3a265dbd5a73a24ef76354258ede1e689d8d8d26..ad2cb1f37c9b21d00d1c78e6179ecb56549c08e2 100755 (executable)
@@ -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\""
index 94bb0570a3b2b2d5383de80c33a7972e213a013f..f73535b7bf7e7d45afa2ff28a193ac8363a8713d 100755 (executable)
@@ -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="==-=-=="
index 2167ba8ef97333b90b89e9c765c27720461865bc..594d301f7c3a5407c3a6d5b6ab068a0bcda40115 100755 (executable)
@@ -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"' \
index 69d8dc50ff8652f7f40a0d2a591f8f622e77a01d..68b85ced724eff3f57444ad043b01b7153b5f745 100755 (executable)
@@ -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"' \
index 832a4ad311b708e5b8f86dd2df92d7958fd6c96b..99fdef72e634fad35e91801e2f292a749c615c76 100755 (executable)
@@ -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
index 4fb67ffbfc0dab7a88075ceb78636ae2da34b7dd..ebe710f98c55a6d9130449be5c5dc47143bff51e 100755 (executable)
@@ -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>"' \
index 608334dc023ecd4bb4d82636bbd60dd8d596b80f..134a106365c4618064218c4f5619af5f5a8d54a3 100755 (executable)
@@ -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>"' \
index 75fb0b404bbebbf134cc4fe7c040016817245910..0870ff921f1e1642359fe088fff7f0e9ef8a3e63 100755 (executable)
@@ -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"
index 6f45d3959bf2d6f020d9ab8731331deb106dd0b7..251c0b40f186c2802d47fbaff1b453ec7374ef0a 100755 (executable)
@@ -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
index 89f4d1be4816a8926a0663eeea46db54750e77f3..7f71ce097eb5e582ad1246e36783daf8e995bc64 100755 (executable)
@@ -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.
index 9124ece6f911a8f9862dfc1d008a45680fab90d0..c28ecb0285158feeef94dfac35f35744d475006e 100755 (executable)
@@ -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"'
index 7c562fb9e3537c139f058bd2510b72b02ae988c1..b87182323b7209fcf108a3318a0dfd193db98ce4 100755 (executable)
@@ -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>"' \
index 1fb7c037ee52833c23ea7205d15c4222e572d605..5e3879f5dabf1c52d4665c8d89b9bcf23dced9a0 100755 (executable)
@@ -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"' \
index 8d201c7e8aa42d94c316c3e21a51658c58843de0..2c656a1e0950fdcfc72e8599a9b605b047dbe324 100755 (executable)
@@ -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"' \
index 4456bc6591588e9d6b13d4e1254274b20254c5d9..8c738c47575a5c258d0da247103efc70861914de 100755 (executable)
@@ -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
 
index e9d5e3584f87042472a205eefb00db8c115b7ced..f61e8a973fc58b1cd8a74a623aaa48dc786be06a 100755 (executable)
@@ -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
index 517fa8398261ad7c3aea91d641685c8bdba9baf8..eaf7c980903bed112fc2df81f7af8c7307f1eda1 100755 (executable)
@@ -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
index b473ae4e1c0f8b0d04c25bd64eeed699935b06d6..7fece5f2302c1d11f1cdeb861576440b12a1f618 100755 (executable)
@@ -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
index 401a22c9b1fa70d5735a027ca0cb34e74f429b4c..386156776ba4636171a047daad81835cbcc1b59a 100755 (executable)
@@ -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
 
 ##################################################
 
index 03d24581de2b2ee81ce894a0e1002bf46069616f..b813b6cad2e5d646dcf2a669c4108e85eafaed90 100755 (executable)
@@ -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 ()
 {
index 9c6d4e647db5dc0e124e470e8ed707121406881c..68edc2d3a7abf23d3c0f52e911c70fd600c2a33a 100755 (executable)
@@ -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
index 8748b3d00eeb0cdae3df92a6c5299ca4abf59f78..0a2727e74fb4573a36294ac3f68260b9f26f3e2e 100755 (executable)
@@ -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)
index a46a2df2a1febb740a0e5bd180da97224e0677ba..17a3e478aecad546e6a8ffee0949ef14c7db5a2e 100755 (executable)
@@ -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
index 5921cac97e1b704bd40d38b99811af7ff80f1624..a93a7f34bef7c1f64042e7cd7c8627c64a7ec185 100755 (executable)
@@ -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}
 
index 52f9fe0f8bfd7e8ee224f50b4b3785c6888a1c69..a0b76eb89ca1ba1da02c861a39f1e280105dbaf6 100755 (executable)
@@ -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
index 7917a82f0154ef1d8355e62d7ae30ebb796e3fa8..49c690eb0360ab8c1b6e7f00059ea1c0da79b273 100755 (executable)
@@ -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
 
index 4a2b25c6486d5a3cc76dc9759b1520f1bcf034c4..71ed7e38553bcd9e1794992ecfae56e42a2ea4ec 100755 (executable)
@@ -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
index 955c5f7ff295beacdf3dc52b61e5a2ef6b2561c0..bfc10be3b7b5101ee213a620a0628962336f9e09 100755 (executable)
@@ -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'
index 664b79d293fb0ead36326ab4c8a7e04af1da0c7f..02d3b4117b9407f8fed83330681e45ddfa6d9e13 100755 (executable)
@@ -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)'
index ac214a5b2b451c05d0b6d2baa9b733362e8fbf7d..76e795937c6c40794d2583f7a497a683e6b40034 100755 (executable)
@@ -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
 
index db48c7d5b4c0508714f72235c3600719b887bf00..95babb1f081262d8d329b0114dfe2c245621330a 100755 (executable)
@@ -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
 
index 5d6d53a82326c7f58260f83e0798722b5768393e..cb1297caa5dc3f1421c57de1bbeddea41dd3e194 100755 (executable)
@@ -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'
index 958ff888a8652127a855ffe2509af61e247cd11a..dc5978419be770370bb9f9fba228429d3625ad2f 100755 (executable)
@@ -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
 
index 32031e3174d3005413ac0d652b0654f30cfed21f..4bf5d285c49b43c567f94fb85c556b5d34317efc 100755 (executable)
@@ -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
index 18b56600480c7052e09b5e94973d0a0d852c84e9..28564c3c9da2d8c308940865896363e9a3fda5ef 100755 (executable)
@@ -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
index ab90fcc5a76d444c831843d681c2499afc936c2e..d1c70cfaf5d5fca98e66b9e1c6a2709f55fb7731 100755 (executable)
@@ -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
 
index fc4ecdc30b1655d51346e7f68a2fbb38360f7a91..5c5b99a0e2b0545318764f33b1cbdb329d6db974 100755 (executable)
@@ -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
 
index fa288bb199038ba445206905713b7b32d647ca60..6837ff17663002cfb8c4f9f627f2715ed6d2d154 100755 (executable)
@@ -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"' \
index fb232a32510f77eced30311d02da2fc4a757d73e..16222650eafc68b1d1f816a8cdda96bc3b0ce23a 100755 (executable)
@@ -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
 
index f0fd1511d0567f99fd0ab027a8e627441855431e..69ebec68846482a1a701c72e788eee7bdd9135c6 100755 (executable)
@@ -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
 
index f94a660d750838b63d6ab263190bbdfef126831d..9d5a9e70a598089793d5d06b136dcbd0ae428ced 100755 (executable)
@@ -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 ""
index a50eca807700f7a3d87d58c5374c40b404fd3857..06a6b860ae8a09f5362a18a3a36acf4a734c1ed4 100755 (executable)
@@ -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
 
index 76ad227944a0636b53168c8c0afd401dc26ef767..a59e7c980fc97c7c0fb4658cfe616da63d5a9e15 100755 (executable)
@@ -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
 
index 512559a3aff90086809247e2cb3e8ef0a6451e32..01aa3efd2e7949bb170ca817af1d42fa39683ff9 100755 (executable)
@@ -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
 
index 1b308693c527cf026f1fa5005e93f20f54588813..46f3a76d574fbd8c485179ac6e241a5cc93ed07a 100755 (executable)
@@ -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
 
index 38abc2113c269cc328417312629789054b2d863d..53932d63effe56d917b57e20e6315364750e883c 100755 (executable)
@@ -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
index 495b7699a0a781beee246fb6070bdb67e3ae584d..59496c3e94a15d490c1f7f598fbfe8506dd99e5c 100755 (executable)
@@ -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"
 
index ba5f55daf9b189176a2955be325d98847094728f..74b3f5a1811f5fa6664f157d28480d6214b25cf6 100755 (executable)
@@ -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
 
index f46475e8ddccf6dc1926b7cf198da3d088592194..085ffe4377c2c3a034bd991dc1450723b6004549 100755 (executable)
@@ -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
index cd9e33a7c4057505986338b8716fd231b30e8643..d7903ce799da7ac846fce8c50f0c521f70650adc 100755 (executable)
@@ -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
 
index e35e35f64289d5b84c11b5c0d244e7d3f6e09728..274105c708fa2d4c73429520e3811fcdce6debff 100755 (executable)
@@ -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
index d5def7649d0f71fda66c9910e611ec04a5741b10..4085340f66d42b270c13ced3c5eb845fa2cc48c6 100755 (executable)
@@ -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
index a98e11c88714aace6ec417d50de92fce2da916cf..f65544b9ffdf70d07f1f94a4c9b3448dcc84aa5a 100755 (executable)
@@ -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]='"()"'
 
index 21a9689ab870a222bd80e6c54ba4fa4a8c62e1b3..c198c506378ca077d75d0213008a373dc5826464 100755 (executable)
@@ -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'
index 74f33708be93e70bd59b6dd921a08df1fa8ea7fa..62ba849852310beaf815a5c30712991edefd0720 100755 (executable)
@@ -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
 
index a4f4b5f50f8da02e58761abf1457e34ee0722a12..9aa47611a93545b12d43e9046a995e1d4a702098 100755 (executable)
@@ -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
 
index 051fbb3cef4812d4c488440d40d002c56bf4c583..2b7bc6588b8db736f2bbb4a843c43e49388eeefb 100755 (executable)
@@ -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
 
index 158be28a365eaef601efea2209ab07bcafce8622..8af6d9a97600b0ad867a42839841908a8c6c82e4 100755 (executable)
@@ -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 '