[PATCH 1/4] test: fix test_require_external_prereq()

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Mon Nov 28 14:41:04 PST 2011


test_missing_external_prereq_${binary}_ variable indicates that the
binary is missing.  It must be set in test_declare_external_prereq()
outside of the fake $binary() function.
---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 11e6646..d7282ff 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -554,8 +554,8 @@ test_declare_external_prereq () {
 	test "$#" = 2 && name=$2 || name="$binary(1)"
 
 	hash $binary 2>/dev/null || eval "
-$binary () {
 	test_missing_external_prereq_${binary}_=t
+$binary () {
 	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -e \" $name \" ||
 	test_subtest_missing_external_prereqs_=\"$test_subtest_missing_external_prereqs_ $name\"
 	false
-- 
1.7.7.3



More information about the notmuch mailing list