summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-01-06 17:51:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-07 16:47:55 (GMT)
commite9882c80cda6decc2381ecbdd1f99ad6e49b4662 (patch)
tree101916a69b0c7d551d345c479ef21d89bafec91c /t/t5000-tar-tree.sh
parent25d3d323633dbf3b8e8fbe209c9054196a202cf7 (diff)
downloadgit-e9882c80cda6decc2381ecbdd1f99ad6e49b4662.zip
git-e9882c80cda6decc2381ecbdd1f99ad6e49b4662.tar.gz
git-e9882c80cda6decc2381ecbdd1f99ad6e49b4662.tar.bz2
t5000, t5003: move ZIP tests into their own script
This makes ZIP specific tweaks easier. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-xt/t5000-tar-tree.sh69
1 files changed, 0 insertions, 69 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 2178f14..e7c240f 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -25,37 +25,11 @@ commit id embedding:
'
. ./test-lib.sh
-GIT_UNZIP=${GIT_UNZIP:-unzip}
GZIP=${GZIP:-gzip}
GUNZIP=${GUNZIP:-gzip -d}
SUBSTFORMAT=%H%n
-test_lazy_prereq UNZIP '
- "$GIT_UNZIP" -v
- test $? -ne 127
-'
-
-check_zip() {
- zipfile=$1.zip
- listfile=$1.lst
- dir=$1
- dir_with_prefix=$dir/$2
-
- test_expect_success UNZIP " extract ZIP archive" '
- (mkdir $dir && cd $dir && "$GIT_UNZIP" ../$zipfile)
- '
-
- test_expect_success UNZIP " validate filenames" "
- (cd ${dir_with_prefix}a && find .) | sort >$listfile &&
- test_cmp a.lst $listfile
- "
-
- test_expect_success UNZIP " validate file contents" "
- diff -r a ${dir_with_prefix}a
- "
-}
-
test_expect_success \
'populate workdir' \
'mkdir a b c &&
@@ -206,55 +180,12 @@ test_expect_success \
test_cmp a/substfile2 g/prefix/a/substfile2
'
-test_expect_success \
- 'git archive --format=zip' \
- 'git archive --format=zip HEAD >d.zip'
-
-check_zip d
-
-test_expect_success \
- 'git archive --format=zip in a bare repo' \
- '(cd bare.git && git archive --format=zip HEAD) >d1.zip'
-
-test_expect_success \
- 'git archive --format=zip vs. the same in a bare repo' \
- 'test_cmp d.zip d1.zip'
-
-test_expect_success 'git archive --format=zip with --output' \
- 'git archive --format=zip --output=d2.zip HEAD &&
- test_cmp d.zip d2.zip'
-
-test_expect_success 'git archive with --output, inferring format' '
- git archive --output=d3.zip HEAD &&
- test_cmp d.zip d3.zip
-'
-
test_expect_success 'git archive with --output, override inferred format' '
git archive --format=tar --output=d4.zip HEAD &&
test_cmp b.tar d4.zip
'
test_expect_success \
- 'git archive --format=zip with prefix' \
- 'git archive --format=zip --prefix=prefix/ HEAD >e.zip'
-
-check_zip e prefix/
-
-test_expect_success 'git archive -0 --format=zip on large files' '
- test_config core.bigfilethreshold 1 &&
- git archive -0 --format=zip HEAD >large.zip
-'
-
-check_zip large
-
-test_expect_success 'git archive --format=zip on large files' '
- test_config core.bigfilethreshold 1 &&
- git archive --format=zip HEAD >large-compressed.zip
-'
-
-check_zip large-compressed
-
-test_expect_success \
'git archive --list outside of a git repo' \
'GIT_DIR=some/non-existing/directory git archive --list'