unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH v2] test: source $NOTMUCH_SRCDIR/test/test-lib-emacs.sh
Date: Sun, 23 May 2021 10:34:43 +0300	[thread overview]
Message-ID: <20210523073443.11618-1-tomi.ollila@iki.fi> (raw)
In-Reply-To: <20210522152741.27213-1-tomi.ollila@iki.fi>

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.
---

s/_BUILDD/_SRCD/ to id:20210522152741.27213-1-tomi.ollila@iki.fi

now works with in-tree and out-of-tree builds.

 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_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\""
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_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\""
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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_SRCDIR/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_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"' \
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_SRCDIR/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_SRCDIR/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_SRCDIR/test/test-lib-emacs.sh || exit 1
 
 test_require_emacs
 
-- 
2.25.1

  parent reply	other threads:[~2021-05-23  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 15:27 [PATCH] test: source $NOTMUCH_BUILDDIR/test/test-lib-emacs.sh Tomi Ollila
2021-05-22 16:06 ` Tomi Ollila
2021-05-23  7:34 ` Tomi Ollila [this message]
2021-06-03 12:33   ` [PATCH v2] test: source $NOTMUCH_SRCDIR/test/test-lib-emacs.sh David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210523073443.11618-1-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).