]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | test_description='respect crlf in git archive' | |
4 | ||
5 | . ./test-lib.sh | |
6 | ||
7 | test_expect_success setup ' | |
8 | ||
9 | git config core.autocrlf true && | |
10 | ||
11 | printf "CRLF line ending\r\nAnd another\r\n" > sample && | |
12 | git add sample && | |
13 | ||
14 | test_tick && | |
15 | git commit -m Initial | |
16 | ||
17 | ' | |
18 | ||
19 | test_expect_success 'tar archive' ' | |
20 | ||
21 | git archive --format=tar HEAD | | |
22 | ( mkdir untarred && cd untarred && "$TAR" -xf - ) && | |
23 | ||
24 | test_cmp sample untarred/sample | |
25 | ||
26 | ' | |
27 | ||
28 | test_expect_success UNZIP 'zip archive' ' | |
29 | ||
30 | git archive --format=zip HEAD >test.zip && | |
31 | ||
32 | ( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) && | |
33 | ||
34 | test_cmp sample unzipped/sample | |
35 | ||
36 | ' | |
37 | ||
38 | test_done |