Skip to content

Commit

Permalink
t0008: do not depend on 'echo' handling backslashes specially
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jun 13, 2014
1 parent e61a6c1 commit 97c1364
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions t/t0008-ignores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -816,12 +816,14 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'correct handling of backslashes' '
>"whitespace/trailing 5 \\ \\ " &&
>"whitespace/trailing 6 \\a\\" &&
>whitespace/untracked &&
echo "whitespace/trailing 1 \\ " >ignore &&
echo "whitespace/trailing 2 \\\\\\\\\\\\\\\\" >>ignore &&
echo "whitespace/trailing 3 \\\\\\\\\\\\\\\\ " >>ignore &&
echo "whitespace/trailing 4 \\\\\\\\\\\\ " >>ignore &&
echo "whitespace/trailing 5 \\\\\\\\ \\\\\\\\\\\\ " >>ignore &&
echo "whitespace/trailing 6 \\\\\\\\a\\\\\\\\" >>ignore &&
sed -e "s/Z$//" >ignore <<-\EOF &&
whitespace/trailing 1 \ Z
whitespace/trailing 2 \\\\Z
whitespace/trailing 3 \\\\ Z
whitespace/trailing 4 \\\ Z
whitespace/trailing 5 \\ \\\ Z
whitespace/trailing 6 \\a\\Z
EOF
echo whitespace/untracked >expect &&
>err.expect &&
git ls-files -o -X ignore whitespace >actual 2>err &&
Expand Down

0 comments on commit 97c1364

Please sign in to comment.