Skip to content

Commit aa13132

Browse files
committed
Merge branch 'jk/t5000-gzip-simplify'
Test fix. * jk/t5000-gzip-simplify: t5000: simplify gzip prerequisite checks
2 parents f963371 + 9617414 commit aa13132

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

t/t5000-tar-tree.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ commit id embedding:
2525
'
2626

2727
. ./test-lib.sh
28-
GZIP=${GZIP:-gzip}
29-
GUNZIP=${GUNZIP:-gzip -d}
3028

3129
SUBSTFORMAT=%H%n
3230

@@ -39,6 +37,8 @@ test_lazy_prereq TAR_NEEDS_PAX_FALLBACK '
3937
)
4038
'
4139

40+
test_lazy_prereq GZIP 'gzip --version'
41+
4242
get_pax_header() {
4343
file=$1
4444
header=$2=
@@ -265,12 +265,6 @@ test_expect_success 'only enabled filters are available remotely' '
265265
test_cmp remote.bar config.bar
266266
'
267267

268-
if $GZIP --version >/dev/null 2>&1; then
269-
test_set_prereq GZIP
270-
else
271-
say "Skipping some tar.gz tests because gzip not found"
272-
fi
273-
274268
test_expect_success GZIP 'git archive --format=tgz' '
275269
git archive --format=tgz HEAD >j.tgz
276270
'
@@ -290,14 +284,8 @@ test_expect_success GZIP 'infer tgz from .tar.gz filename' '
290284
test_cmp j.tgz j3.tar.gz
291285
'
292286

293-
if $GUNZIP --version >/dev/null 2>&1; then
294-
test_set_prereq GUNZIP
295-
else
296-
say "Skipping some tar.gz tests because gunzip was not found"
297-
fi
298-
299-
test_expect_success GZIP,GUNZIP 'extract tgz file' '
300-
$GUNZIP -c <j.tgz >j.tar &&
287+
test_expect_success GZIP 'extract tgz file' '
288+
gzip -d -c <j.tgz >j.tar &&
301289
test_cmp b.tar j.tar
302290
'
303291

0 commit comments

Comments
 (0)