summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j6t@kdbg.org>2009-03-16 14:44:56 +0100
committerLibravatar Johannes Sixt <j6t@kdbg.org>2009-03-22 17:52:43 +0100
commit552a26c8c069c582d2572399eb4ac176634a03cb (patch)
tree200c0d0092e7e7d84f6250bc5e6a65a283b59445 /t/t5000-tar-tree.sh
parentt3700: Skip a test with backslashes in pathspec (diff)
downloadtgif-552a26c8c069c582d2572399eb4ac176634a03cb.tar.xz
Use prerequisites to skip tests that need unzip
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-xt/t5000-tar-tree.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 60a4b8dc0d..7641e0dd46 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -187,20 +187,20 @@ test_expect_success 'git archive --format=zip with --output' \
$UNZIP -v >/dev/null 2>&1
if [ $? -eq 127 ]; then
say "Skipping ZIP tests, because unzip was not found"
- test_done
- exit
+else
+ test_set_prereq UNZIP
fi
-test_expect_success \
+test_expect_success UNZIP \
'extract ZIP archive' \
'(mkdir d && cd d && $UNZIP ../d.zip)'
-test_expect_success \
+test_expect_success UNZIP \
'validate filenames' \
'(cd d/a && find .) | sort >d.lst &&
test_cmp a.lst d.lst'
-test_expect_success \
+test_expect_success UNZIP \
'validate file contents' \
'diff -r a d/a'
@@ -208,16 +208,16 @@ test_expect_success \
'git archive --format=zip with prefix' \
'git archive --format=zip --prefix=prefix/ HEAD >e.zip'
-test_expect_success \
+test_expect_success UNZIP \
'extract ZIP archive with prefix' \
'(mkdir e && cd e && $UNZIP ../e.zip)'
-test_expect_success \
+test_expect_success UNZIP \
'validate filenames with prefix' \
'(cd e/prefix/a && find .) | sort >e.lst &&
test_cmp a.lst e.lst'
-test_expect_success \
+test_expect_success UNZIP \
'validate file contents with prefix' \
'diff -r a e/prefix/a'