t5000: Fix CRLF vs LF issue

All CRLF vs LF errors are introduced by the tr tool.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
This commit is contained in:
Thomas Braun
2014-05-16 22:05:49 +02:00
parent c3051dfbd6
commit 232ce5fc3a
2 changed files with 11 additions and 0 deletions

View File

@@ -240,9 +240,11 @@ test_expect_success 'archive --list shows only enabled remote filters' '
test_expect_success 'invoke tar filter by format' '
git archive --format=tar.foo HEAD >config.tar.foo &&
tr ab ba <config.tar.foo >config.tar &&
d2u_force config.tar &&
test_cmp_bin b.tar config.tar &&
git archive --format=bar HEAD >config.bar &&
tr ab ba <config.bar >config.tar &&
d2u_force config.tar &&
test_cmp_bin b.tar config.tar
'
@@ -267,6 +269,7 @@ test_expect_success 'only enabled filters are available remotely' '
test_must_fail git archive --remote=. --format=tar.foo HEAD \
>remote.tar.foo &&
git archive --remote=. --format=bar >remote.bar HEAD &&
d2u_force config.bar &&
test_cmp_bin remote.bar config.bar
'

View File

@@ -866,3 +866,11 @@ mingw_read_file_strip_cr_ () {
eval "$1=\$$1\$line"
done
}
# Perform dos2unix line ending conversion for binary files
d2u_force() {
if test_have_prereq MINGW
then
dos2unix --force "$1"
fi
}