interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t0024-crlf-archive.sh

43 lines · 639 bytes Raw Blame History
1#!/bin/sh
2
3test_description='respect crlf in git archive'
4
5. ./test-lib.sh
6
7test_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
19test_expect_success 'tar archive' '
20
21 git archive --format=tar HEAD >test.tar &&
22 mkdir untarred &&
23 "$TAR" xf test.tar -C untarred &&
24
25 test_cmp sample untarred/sample
26
27'
28
29test_expect_success UNZIP 'zip archive' '
30
31 git archive --format=zip HEAD >test.zip &&
32
33 mkdir unzipped &&
34 (
35 cd unzipped &&
36 "$GIT_UNZIP" ../test.zip
37 ) &&
38
39 test_cmp sample unzipped/sample
40
41'
42
43test_done