Code

t3701: fix here document
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 May 2011 18:28:52 +0000 (11:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 May 2011 18:28:52 +0000 (11:28 -0700)
A broken here-document was not caught because end of file is taken by
an implicit end of the here document (POSIX does not seem to say it is
an error to lack the delimiter), and everything in the test just turned
into a single "cat into a file".

Noticed-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3701-add-interactive.sh

index d6327e7c74cd0cd3d433a71b1e9bb89eaf088ed5..fdcbe2e73629fe16bb0d62621b97c624cef5f77c 100755 (executable)
@@ -82,10 +82,9 @@ EOF
 '
 
 test_expect_success PERL 'setup fake editor' '
-       cat >fake_editor.sh <<EOF
-       EOF
+       >fake_editor.sh &&
        chmod a+x fake_editor.sh &&
-       test_set_editor "$(pwd)/fake_editor.sh" &&
+       test_set_editor "$(pwd)/fake_editor.sh"
 '
 
 test_expect_success PERL 'dummy edit works' '