OSDN Git Service

t5601: fix quotation error leading to skipped tests
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 26 Apr 2015 20:30:11 +0000 (20:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Apr 2015 22:23:12 +0000 (15:23 -0700)
One of the tests in t5601 used single quotes to delimit an argument
containing spaces.  However, this caused test_expect_success to be
passed three arguments instead of two, which in turn caused the test
name to be treated as a prerequisite instead of a test name.  As there
was no prerequisite called "bracketed hostnames are still ssh", the test
was always skipped.

Because this test was always skipped, the fact that it passed the
arguments in the wrong order was obscured.  Use double quotes inside the
test and reorder the arguments so that the test runs and properly
reflects the arguments that are passed to ssh.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5601-clone.sh

index 02b40b1..5efc177 100755 (executable)
@@ -332,7 +332,7 @@ test_expect_success !MINGW,!CYGWIN 'clone local path foo:bar' '
 
 test_expect_success 'bracketed hostnames are still ssh' '
        git clone "[myhost:123]:src" ssh-bracket-clone &&
-       expect_ssh myhost '-p 123' src
+       expect_ssh "-p 123" myhost src
 '
 
 counter=0