Merge branch 'ja/doc-synopsis-markup'
[git/gitster.git] / t / t0024-crlf-archive.sh
bloba7f4de4a43ffa022ae56ebf14999cbe81900a4a9
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 >test.tar &&
23 mkdir untarred &&
24 "$TAR" xf test.tar -C untarred &&
26 test_cmp sample untarred/sample
30 test_expect_success UNZIP 'zip archive' '
32 git archive --format=zip HEAD >test.zip &&
34 mkdir unzipped &&
36 cd unzipped &&
37 "$GIT_UNZIP" ../test.zip
38 ) &&
40 test_cmp sample unzipped/sample
44 test_done