* [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh
@ 2012-11-21 15:16 Tomi Ollila
2012-11-25 2:13 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Tomi Ollila @ 2012-11-21 15:16 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila, Tomi Ollila
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh
2012-11-21 15:16 [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh Tomi Ollila
@ 2012-11-25 2:13 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2012-11-25 2:13 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila, Tomi Ollila
Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> Changed the 9 files to execute '. ./test-lib.sh'. The test-lib.sh
> should never be loaded from directory in PATH.
Pushed.
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-25 2:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21 15:16 [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh Tomi Ollila
2012-11-25 2:13 ` David Bremner
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).