3 test_description
='respect crlf in git archive'
6 GIT_UNZIP
=${GIT_UNZIP:-unzip}
8 test_lazy_prereq UNZIP
'
13 test_expect_success setup
'
15 git config core.autocrlf true &&
17 printf "CRLF line ending\r\nAnd another\r\n" > sample &&
25 test_expect_success
'tar archive' '
27 git archive --format=tar HEAD |
28 ( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
30 test_cmp sample untarred/sample
34 test_expect_success UNZIP
'zip archive' '
36 git archive --format=zip HEAD >test.zip &&
38 ( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) &&
40 test_cmp sample unzipped/sample