mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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>
This commit is contained in:
parent
e61a6c1d82
commit
97c1364be6
|
@ -816,12 +816,14 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'correct handling of backslashes' '
|
||||||
>"whitespace/trailing 5 \\ \\ " &&
|
>"whitespace/trailing 5 \\ \\ " &&
|
||||||
>"whitespace/trailing 6 \\a\\" &&
|
>"whitespace/trailing 6 \\a\\" &&
|
||||||
>whitespace/untracked &&
|
>whitespace/untracked &&
|
||||||
echo "whitespace/trailing 1 \\ " >ignore &&
|
sed -e "s/Z$//" >ignore <<-\EOF &&
|
||||||
echo "whitespace/trailing 2 \\\\\\\\\\\\\\\\" >>ignore &&
|
whitespace/trailing 1 \ Z
|
||||||
echo "whitespace/trailing 3 \\\\\\\\\\\\\\\\ " >>ignore &&
|
whitespace/trailing 2 \\\\Z
|
||||||
echo "whitespace/trailing 4 \\\\\\\\\\\\ " >>ignore &&
|
whitespace/trailing 3 \\\\ Z
|
||||||
echo "whitespace/trailing 5 \\\\\\\\ \\\\\\\\\\\\ " >>ignore &&
|
whitespace/trailing 4 \\\ Z
|
||||||
echo "whitespace/trailing 6 \\\\\\\\a\\\\\\\\" >>ignore &&
|
whitespace/trailing 5 \\ \\\ Z
|
||||||
|
whitespace/trailing 6 \\a\\Z
|
||||||
|
EOF
|
||||||
echo whitespace/untracked >expect &&
|
echo whitespace/untracked >expect &&
|
||||||
>err.expect &&
|
>err.expect &&
|
||||||
git ls-files -o -X ignore whitespace >actual 2>err &&
|
git ls-files -o -X ignore whitespace >actual 2>err &&
|
||||||
|
|
Loading…
Reference in a new issue