From: Johannes Sixt Date: Mon, 16 Mar 2009 13:44:56 +0000 (+0100) Subject: Use prerequisites to skip tests that need unzip X-Git-Tag: v1.6.3-rc0~93^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=552a26c8c069c582d2572399eb4ac176634a03cb;p=git.git Use prerequisites to skip tests that need unzip Signed-off-by: Johannes Sixt --- diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh index ae90d34f6..c7d032437 100755 --- a/t/t0024-crlf-archive.sh +++ b/t/t0024-crlf-archive.sh @@ -29,11 +29,11 @@ test_expect_success 'tar archive' ' "$UNZIP" -v >/dev/null 2>&1 if [ $? -eq 127 ]; then say "Skipping ZIP test, because unzip was not found" - test_done - exit +else + test_set_prereq UNZIP fi -test_expect_success 'zip archive' ' +test_expect_success UNZIP 'zip archive' ' git archive --format=zip HEAD >test.zip && diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 60a4b8dc0..7641e0dd4 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'