Diff options
Diffstat (limited to 'tests/t0110-snapshot.sh')
-rwxr-xr-xtests/t0110-snapshot.sh20
1 file changed, 4 insertions, 16 deletions
diff --git a/tests/t0110-snapshot.sh b/tests/t0110-snapshot.sh
index 969368d..6221efc 100755
--- a/tests/t0110-snapshot.sh
+++ b/tests/t0110-snapshot.sh
@@ -17,12 +17,7 @@ test_tar_snapshot() {
tool=$3
prereq=$4
- if command -v "$tool" >/dev/null 2>&1
- then
- test_set_prereq $prereq
- else
- say "Skipping $ext validation tests: $tool not found"
- fi
+ test_lazy_prereq $prereq "command -v $tool"
test_expect_success $prereq "get foo/snapshot/master.$ext" "
cgit_url 'foo/snapshot/master.$ext' >tmp
@@ -77,13 +72,6 @@ test_tar_snapshot tar.lz application/x-lzip lzip LZIP
test_tar_snapshot tar.xz application/x-xz xz XZ
test_tar_snapshot tar.zst application/zstd zstd ZSTD
-if command -v unzip >/dev/null 2>&1
-then
- test_set_prereq UNZIP
-else
- say 'Skipping zip validation tests: unzip not found'
-fi
-
test_expect_success 'get foo/snapshot/master.zip' '
cgit_url "foo/snapshot/master.zip" >tmp
'
@@ -99,12 +87,12 @@ test_expect_success 'strip off the header lines' '
'
test_expect_success UNZIP 'verify zip format' '
- unzip -t master.zip
+ "$GIT_UNZIP" -t master.zip
'
test_expect_success UNZIP 'unzip and verify the content' '
rm -rf master &&
- unzip master.zip &&
+ "$GIT_UNZIP" master.zip &&
ls master/ >output &&
test_line_count = 5 output &&
grep "^5$" master/file-5 &&
@@ -212,7 +200,7 @@ test_expect_success GZIP 'a compressed snapshot is made without a PATH' '
# A link offers the snapshot of a tag, and the name on it has to lead back to
# that tag even when a branch is spelled like the tag's stem.
-test_expect_success 'a snapshot name leads to the tag ahead of a branch' '
+test_expect_success GZIP 'a snapshot name leads to the tag ahead of a branch' '
git -C repos/vtags update-ref refs/heads/1.0 $(git -C repos/vtags commit-tree -m shadow HEAD^{tree}) &&
CGIT_CONFIG="$PWD/vtagsrc" QUERY_STRING="url=vtags/snapshot/vtags-1.0.tar.gz" cgit >tmp &&
strip_headers <tmp >tag.tar.gz &&