test-lib: factor out $GIT_UNZIP setup
We set up the $GIT_UNZIP variable and lazy prereq in multiple places (and the next patch is about to add another one). Let's factor it out to avoid repeating ourselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ca70c9ea72
commit
f838ce5826
@ -3,12 +3,6 @@
|
||||
test_description='respect crlf in git archive'
|
||||
|
||||
. ./test-lib.sh
|
||||
GIT_UNZIP=${GIT_UNZIP:-unzip}
|
||||
|
||||
test_lazy_prereq UNZIP '
|
||||
"$GIT_UNZIP" -v
|
||||
test $? -ne 127
|
||||
'
|
||||
|
||||
test_expect_success setup '
|
||||
|
||||
|
@ -3,15 +3,9 @@
|
||||
test_description='git archive --format=zip test'
|
||||
|
||||
. ./test-lib.sh
|
||||
GIT_UNZIP=${GIT_UNZIP:-unzip}
|
||||
|
||||
SUBSTFORMAT=%H%n
|
||||
|
||||
test_lazy_prereq UNZIP '
|
||||
"$GIT_UNZIP" -v
|
||||
test $? -ne 127
|
||||
'
|
||||
|
||||
test_lazy_prereq UNZIP_SYMLINKS '
|
||||
(
|
||||
mkdir unzip-symlinks &&
|
||||
|
@ -750,3 +750,9 @@ test_lazy_prereq AUTOIDENT '
|
||||
# When the tests are run as root, permission tests will report that
|
||||
# things are writable when they shouldn't be.
|
||||
test -w / || test_set_prereq SANITY
|
||||
|
||||
GIT_UNZIP=${GIT_UNZIP:-unzip}
|
||||
test_lazy_prereq UNZIP '
|
||||
"$GIT_UNZIP" -v
|
||||
test $? -ne 127
|
||||
'
|
||||
|
Loading…
Reference in New Issue
Block a user