test: source $NOTMUCH_SRCDIR/test/test-lib-emacs.sh

Sourcing test-lib.sh will cd to TMP_DIRECTORY, so
relative path in $0 will not work in previous version
 . $(dirname "$0")/test-lib-emacs.sh

Now individual test scripts -- e.g. ./test/T310-emacs.sh
will work.
This commit is contained in:
Tomi Ollila 2021-05-23 10:34:43 +03:00 committed by David Bremner
parent 100106a45d
commit 572af27950
19 changed files with 19 additions and 19 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="--format=json output"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.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\""

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="--format=sexp output"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.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\""

View file

@ -2,7 +2,7 @@
test_description="emacs interface"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="Emacs with large search results buffer"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
x=xxxxxxxxxx # 10
x=$x$x$x$x$x$x$x$x$x$x # 100

View file

@ -2,7 +2,7 @@
test_description="emacs: mail subject to filename"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs

View file

@ -6,7 +6,7 @@
test_description='PGP/MIME signature verification and decryption'
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
##################################################

View file

@ -2,7 +2,7 @@
test_description='S/MIME signature verification and decryption'
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs
test_require_external_prereq openssl

View file

@ -4,7 +4,7 @@
test_description='indexing decrypted mail'
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
##################################################

View file

@ -2,7 +2,7 @@
test_description="protected headers in emacs interface"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
# testing protected headers with emacs
test_require_emacs

View file

@ -2,7 +2,7 @@
test_description="emacs test function sanity"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_begin_subtest "emacs test function sanity"
test_emacs_expect_t 't'

View file

@ -2,7 +2,7 @@
test_description="emacs address cleaning"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs

View file

@ -2,7 +2,7 @@
test_description="emacs notmuch-hello view"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output

View file

@ -2,7 +2,7 @@
test_description="emacs notmuch-show view"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs-show.expected-output

View file

@ -2,7 +2,7 @@
test_description="emacs notmuch-show charset handling"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
UTF8_YEN=$'\xef\xbf\xa5'

View file

@ -2,7 +2,7 @@
test_description="emacs tree view interface"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs-tree.expected-output

View file

@ -10,7 +10,7 @@ test_description='test of proper handling of in-reply-to and references headers'
# non-RFC-compliant headers'
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_begin_subtest "Use References when In-Reply-To is broken"
add_message '[id]="foo@one.com"' \

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
test_description="Emacs Draft Handling"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs
add_email_corpus

View file

@ -2,7 +2,7 @@
test_description="emacs attachment warnings"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs

View file

@ -2,7 +2,7 @@
test_description="emacs forwarding"
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib-emacs.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_require_emacs