From 91e95e1c9257c2f80ebd6548675a6ec31582fbba Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Wed, 21 Nov 2012 17:16:14 +0200 Subject: [PATCH] [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh --- e8/4cb623213842b00415ae06decf8c60f7ad4592 | 183 ++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 e8/4cb623213842b00415ae06decf8c60f7ad4592 diff --git a/e8/4cb623213842b00415ae06decf8c60f7ad4592 b/e8/4cb623213842b00415ae06decf8c60f7ad4592 new file mode 100644 index 000000000..8ae8bc66e --- /dev/null +++ b/e8/4cb623213842b00415ae06decf8c60f7ad4592 @@ -0,0 +1,183 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 3820D431FB6 + for ; Wed, 21 Nov 2012 07:16:23 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id tyIOS1uHjnTe for ; + Wed, 21 Nov 2012 07:16:19 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id C09C5431FAF + for ; Wed, 21 Nov 2012 07:16:18 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 1151F100148; Wed, 21 Nov 2012 17:16:16 +0200 (EET) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH 1/1] test: always source test-lib.sh as ./test-lib.sh +Date: Wed, 21 Nov 2012 17:16:14 +0200 +Message-Id: <1353510974-7084-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +Cc: tomi.ollila@iki.fi, Tomi Ollila +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 21 Nov 2012 15:16:23 -0000 + +From: Tomi Ollila + +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 + -- 2.26.2