On Sat, May 22 2021, Tomi Ollila wrote:

> 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.
> ---
>  test/T160-json.sh                      | 2 +-
>  test/T170-sexp.sh                      | 2 +-
>  test/T310-emacs.sh                     | 2 +-
>  test/T320-emacs-large-search-buffer.sh | 2 +-
>  test/T330-emacs-subject-to-filename.sh | 2 +-
>  test/T350-crypto.sh                    | 2 +-
>  test/T355-smime.sh                     | 2 +-
>  test/T357-index-decryption.sh          | 2 +-
>  test/T358-emacs-protected-headers.sh   | 2 +-
>  test/T420-emacs-test-functions.sh      | 2 +-
>  test/T430-emacs-address-cleaning.sh    | 2 +-
>  test/T440-emacs-hello.sh               | 2 +-
>  test/T450-emacs-show.sh                | 2 +-
>  test/T455-emacs-charsets.sh            | 2 +-
>  test/T460-emacs-tree.sh                | 2 +-
>  test/T510-thread-replies.sh            | 2 +-
>  test/T630-emacs-draft.sh               | 2 +-
>  test/T720-emacs-attachment-warnings.sh | 2 +-
>  test/T730-emacs-forwarding.sh          | 2 +-
>  19 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/test/T160-json.sh b/test/T160-json.sh
> index 638afb4d..9b3bc676 100755
> --- a/test/T160-json.sh
> +++ b/test/T160-json.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1

Too hastily posted; tested that this worked when did in-tree
build, so failed to notice that this should be $NOTMUCH_SRCDIR

-- will test later -- first sed -i s/_BUILDD/_SRCD/ to the
patch file, then apply patch and finally run tests in both
in-tree and out of tree builds...

Tomi


>  
>  test_begin_subtest "Show message: json"
>  add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 
> 12:00:00 -0000\"" "[bcc]=\"test_suite+...@notmuchmail.org\"" 
> "[reply-to]=\"test_suite+repl...@notmuchmail.org\"" 
> "[body]=\"json-show-message\""
> diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh
> index af8c4b44..94648d49 100755
> --- a/test/T170-sexp.sh
> +++ b/test/T170-sexp.sh
> @@ -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_BUILDDIR/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+...@notmuchmail.org\"" 
> "[reply-to]=\"test_suite+repl...@notmuchmail.org\"" 
> "[body]=\"sexp-show-message\""
> diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
> index 1ece6e00..8f114571 100755
> --- a/test/T310-emacs.sh
> +++ b/test/T310-emacs.sh
> @@ -2,7 +2,7 @@
>  
>  test_description="emacs interface"
>  . $(dirname "$0")/test-lib.sh || exit 1
> -. $(dirname "$0")/test-lib-emacs.sh || exit 1
> +. $NOTMUCH_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output
>  
> diff --git a/test/T320-emacs-large-search-buffer.sh 
> b/test/T320-emacs-large-search-buffer.sh
> index d2638c8b..9c42e7f1 100755
> --- a/test/T320-emacs-large-search-buffer.sh
> +++ b/test/T320-emacs-large-search-buffer.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.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 6e09a048..b55566bf 100755
> --- a/test/T330-emacs-subject-to-filename.sh
> +++ b/test/T330-emacs-subject-to-filename.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  
> diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
> index 4508c984..3bcf1488 100755
> --- a/test/T350-crypto.sh
> +++ b/test/T350-crypto.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  ##################################################
>  
> diff --git a/test/T355-smime.sh b/test/T355-smime.sh
> index 69bdcfac..7fa9d337 100755
> --- a/test/T355-smime.sh
> +++ b/test/T355-smime.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  test_require_external_prereq openssl
> diff --git a/test/T357-index-decryption.sh b/test/T357-index-decryption.sh
> index 0d30e566..7b5f13db 100755
> --- a/test/T357-index-decryption.sh
> +++ b/test/T357-index-decryption.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  ##################################################
>  
> diff --git a/test/T358-emacs-protected-headers.sh 
> b/test/T358-emacs-protected-headers.sh
> index b25d7ea7..b296a9c5 100755
> --- a/test/T358-emacs-protected-headers.sh
> +++ b/test/T358-emacs-protected-headers.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  # testing protected headers with emacs
>  test_require_emacs
> diff --git a/test/T420-emacs-test-functions.sh 
> b/test/T420-emacs-test-functions.sh
> index 22e4f01e..cb3820b3 100755
> --- a/test/T420-emacs-test-functions.sh
> +++ b/test/T420-emacs-test-functions.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.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 640bff3f..4063dd0d 100755
> --- a/test/T430-emacs-address-cleaning.sh
> +++ b/test/T430-emacs-address-cleaning.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  
> diff --git a/test/T440-emacs-hello.sh b/test/T440-emacs-hello.sh
> index 642aa3cc..acd2e57e 100755
> --- a/test/T440-emacs-hello.sh
> +++ b/test/T440-emacs-hello.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output
>  
> diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
> index e58124d4..5e3e4ecd 100755
> --- a/test/T450-emacs-show.sh
> +++ b/test/T450-emacs-show.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  EXPECTED=$NOTMUCH_SRCDIR/test/emacs-show.expected-output
>  
> diff --git a/test/T455-emacs-charsets.sh b/test/T455-emacs-charsets.sh
> index a0f4dc24..dbc4c71e 100755
> --- a/test/T455-emacs-charsets.sh
> +++ b/test/T455-emacs-charsets.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  
>  UTF8_YEN=$'\xef\xbf\xa5'
> diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh
> index dfc69049..ce2bbfe7 100755
> --- a/test/T460-emacs-tree.sh
> +++ b/test/T460-emacs-tree.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  EXPECTED=$NOTMUCH_SRCDIR/test/emacs-tree.expected-output
>  
> diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh
> index cdb4be44..a6be6867 100755
> --- a/test/T510-thread-replies.sh
> +++ b/test/T510-thread-replies.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_begin_subtest "Use References when In-Reply-To is broken"
>  add_message '[id]="f...@one.com"' \
> diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh
> index 8553f022..495b0a69 100755
> --- a/test/T630-emacs-draft.sh
> +++ b/test/T630-emacs-draft.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  add_email_corpus
> diff --git a/test/T720-emacs-attachment-warnings.sh 
> b/test/T720-emacs-attachment-warnings.sh
> index 4e8c5d26..f361f7ac 100755
> --- a/test/T720-emacs-attachment-warnings.sh
> +++ b/test/T720-emacs-attachment-warnings.sh
> @@ -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_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  
> diff --git a/test/T730-emacs-forwarding.sh b/test/T730-emacs-forwarding.sh
> index 378067ed..5593ae5d 100755
> --- a/test/T730-emacs-forwarding.sh
> +++ b/test/T730-emacs-forwarding.sh
> @@ -2,7 +2,7 @@
>  
>  test_description="emacs forwarding"
>  . $(dirname "$0")/test-lib.sh || exit 1
> -. $(dirname "$0")/test-lib-emacs.sh || exit 1
> +. $NOTMUCH_BUILDDIR/test/test-lib-emacs.sh || exit 1
>  
>  test_require_emacs
>  
> -- 
> 2.25.1
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to