test: fix error messages for missing binary dependencies
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 28 Nov 2011 22:41:07 +0000 (02:41 +0400)
committerDavid Bremner <bremner@debian.org>
Thu, 1 Dec 2011 01:26:10 +0000 (17:26 -0800)
The fake missing binary functions check if the binary has already be
added to the diagnostic message to avoid duplicates.  Unfortunately,
this check was buggy because the message string does not have the
trailing space.

test/test-lib.sh

index 2861d881d0e9d1ca93f67d2068b5e66d8d13be03..a97595707bf1dba13a72108afd8863af9d64dafa 100644 (file)
@@ -556,7 +556,7 @@ test_declare_external_prereq () {
        hash $binary 2>/dev/null || eval "
        test_missing_external_prereq_${binary}_=t
 $binary () {
-       echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -qe \" $name \" ||
+       echo -n \"\$test_subtest_missing_external_prereqs_ \" | grep -qe \" $name \" ||
        test_subtest_missing_external_prereqs_=\"\$test_subtest_missing_external_prereqs_ $name\"
        false
 }"