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, Tomi Ollila <too@iki.fi>
Subject: [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh
Date: Wed, 21 Nov 2012 17:16:14 +0200	[thread overview]
Message-ID: <1353510974-7084-1-git-send-email-tomi.ollila@iki.fi> (raw)

From: Tomi Ollila <too@iki.fi>

There are currently 45 TESTS scripts. 36 of those load
test-lib.sh using '. ./test-lib.sh' and 9 '. test-lib.sh'.

In latter case test-lib.sh is first searched from directories
in PATH (posix) and then from current directory (bash feature).

Changed the 9 files to execute '. ./test-lib.sh'. The test-lib.sh
should never be loaded from directory in PATH.
---
 test/config                    | 2 +-
 test/emacs                     | 2 +-
 test/emacs-address-cleaning    | 2 +-
 test/emacs-hello               | 2 +-
 test/emacs-large-search-buffer | 2 +-
 test/emacs-show                | 2 +-
 test/emacs-subject-to-filename | 2 +-
 test/emacs-test-functions      | 2 +-
 test/help-test                 | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/config b/test/config
index 93ecb13..cfa1f32 100755
--- a/test/config
+++ b/test/config
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description='"notmuch config"'
-. test-lib.sh
+. ./test-lib.sh
 
 test_begin_subtest "Get string value"
 test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
diff --git a/test/emacs b/test/emacs
index 77265b0..ba3bbd0 100755
--- a/test/emacs
+++ b/test/emacs
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs interface"
-. test-lib.sh
+. ./test-lib.sh
 
 EXPECTED=$TEST_DIRECTORY/emacs.expected-output
 
diff --git a/test/emacs-address-cleaning b/test/emacs-address-cleaning
index 6ddde5c..0472346 100755
--- a/test/emacs-address-cleaning
+++ b/test/emacs-address-cleaning
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs address cleaning"
-. test-lib.sh
+. ./test-lib.sh
 
 test_begin_subtest "notmuch-test-address-clean part 1"
 test_emacs_expect_t '(notmuch-test-address-cleaning-1)'
diff --git a/test/emacs-hello b/test/emacs-hello
index 48d1420..f729616 100755
--- a/test/emacs-hello
+++ b/test/emacs-hello
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs notmuch-hello view"
-. test-lib.sh
+. ./test-lib.sh
 
 EXPECTED=$TEST_DIRECTORY/emacs.expected-output
 
diff --git a/test/emacs-large-search-buffer b/test/emacs-large-search-buffer
index 4351e33..678328d 100755
--- a/test/emacs-large-search-buffer
+++ b/test/emacs-large-search-buffer
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 test_description="Emacs with large search results buffer"
-. test-lib.sh
+. ./test-lib.sh
 
 x=xxxxxxxxxx # 10
 x=$x$x$x$x$x$x$x$x$x$x # 100
diff --git a/test/emacs-show b/test/emacs-show
index ec3be8b..b670abf 100755
--- a/test/emacs-show
+++ b/test/emacs-show
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs notmuch-show view"
-. test-lib.sh
+. ./test-lib.sh
 
 EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output
 
diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename
index a0ffdfe..43529a4 100755
--- a/test/emacs-subject-to-filename
+++ b/test/emacs-subject-to-filename
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs: mail subject to filename"
-. test-lib.sh
+. ./test-lib.sh
 
 # emacs server can't be started in a child process with $(test_emacs ...)
 test_emacs '(ignore)'
diff --git a/test/emacs-test-functions b/test/emacs-test-functions
index 0e1f9fc..ca4a798 100755
--- a/test/emacs-test-functions
+++ b/test/emacs-test-functions
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="emacs test function sanity"
-. test-lib.sh
+. ./test-lib.sh
 
 test_begin_subtest "emacs test function sanity"
 test_emacs_expect_t 't'
diff --git a/test/help-test b/test/help-test
index 9f4b9c7..f7df725 100755
--- a/test/help-test
+++ b/test/help-test
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 test_description="online help"
-. test-lib.sh
+. ./test-lib.sh
 
 test_expect_success 'notmuch --help' 'notmuch --help'
 test_expect_success 'notmuch --help tag' 'notmuch --help tag'
-- 
1.7.11.7

             reply	other threads:[~2012-11-21 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 15:16 Tomi Ollila [this message]
2012-11-25  2:13 ` [PATCH 1/1] test: always source test-lib.sh as ./test-lib.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=1353510974-7084-1-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    --cc=too@iki.fi \
    /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).