path.c: optimize adjust_shared_perm()
[git/raj.git] / t / t0024-crlf-archive.sh
blob5378787e1b23bf18796c28c33533f677b389289c
1 #!/bin/sh
3 test_description='respect crlf in git archive'
5 . ./test-lib.sh
6 GIT_UNZIP=${GIT_UNZIP:-unzip}
8 test_lazy_prereq UNZIP '
9 "$GIT_UNZIP" -v
10 test $? -ne 127
13 test_expect_success setup '
15 git config core.autocrlf true &&
17 printf "CRLF line ending\r\nAnd another\r\n" > sample &&
18 git add sample &&
20 test_tick &&
21 git commit -m Initial
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
44 test_done