git hook run: add an --ignore-missing flag
[alt-git.git] / t / t0024-crlf-archive.sh
bloba34de5642073d1323b37b7c82f56edfe798fcfdd
1 #!/bin/sh
3 test_description='respect crlf in git archive'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success setup '
10 git config core.autocrlf true &&
12 printf "CRLF line ending\r\nAnd another\r\n" > sample &&
13 git add sample &&
15 test_tick &&
16 git commit -m Initial
20 test_expect_success 'tar archive' '
22 git archive --format=tar HEAD |
23 ( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
25 test_cmp sample untarred/sample
29 test_expect_success UNZIP 'zip archive' '
31 git archive --format=zip HEAD >test.zip &&
33 ( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) &&
35 test_cmp sample unzipped/sample
39 test_done