diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-13 13:23:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-13 13:29:03 -0700 |
commit | 97c1364be6b27a6faf046d6d4240a4ebd550ae9f (patch) | |
tree | 36ce2b91885180b079df5e800ec2fe7690cd44c3 /t/t0008-ignores.sh | |
parent | e61a6c1d8272f9d7bdc861ed28bfac5fb7e33556 (diff) | |
download | git-97c1364be6b27a6faf046d6d4240a4ebd550ae9f.tar.gz |
t0008: do not depend on 'echo' handling backslashes speciallypb/trim-trailing-spaces
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>
Diffstat (limited to 't/t0008-ignores.sh')
-rwxr-xr-x | t/t0008-ignores.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index 5ef5ad3db4..39e55a13c8 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -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 && |