t0008: do not depend on 'echo' handling backslashes specially

The original used to pass with /bin/dash but not with /bin/bash set to $SHELL_PATH. The former turns "\\" into "\", but the latter does not. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jun 13, 2014 at 13:23 UTC 97c1364be6b27a6faf046d6d4240a4ebd550ae9f
1 file changed +8 -6
t/t0008-ignores.sh
+8 -6
@@ -816,12 +816,14 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'correct handling of backslashes' '
816 >"whitespace/trailing 5 \\ \\ " &&
817 >"whitespace/trailing 6 \\a\\" &&
818 >whitespace/untracked &&
819 - echo "whitespace/trailing 1 \\ " >ignore &&
820 - echo "whitespace/trailing 2 \\\\\\\\\\\\\\\\" >>ignore &&
821 - echo "whitespace/trailing 3 \\\\\\\\\\\\\\\\ " >>ignore &&
822 - echo "whitespace/trailing 4 \\\\\\\\\\\\ " >>ignore &&
823 - echo "whitespace/trailing 5 \\\\\\\\ \\\\\\\\\\\\ " >>ignore &&
824 - echo "whitespace/trailing 6 \\\\\\\\a\\\\\\\\" >>ignore &&
819 + sed -e "s/Z$//" >ignore <<-\EOF &&
820 + whitespace/trailing 1 \ Z
821 + whitespace/trailing 2 \\\\Z
822 + whitespace/trailing 3 \\\\ Z
823 + whitespace/trailing 4 \\\ Z
824 + whitespace/trailing 5 \\ \\\ Z
825 + whitespace/trailing 6 \\a\\Z
826 + EOF
827 echo whitespace/untracked >expect &&
828 >err.expect &&
829 git ls-files -o -X ignore whitespace >actual 2>err &&