提交 f838ce58 编写于 作者: J Jeff King 提交者: Junio C Hamano

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: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 ca70c9ea
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
test_description='respect crlf in git archive' test_description='respect crlf in git archive'
. ./test-lib.sh . ./test-lib.sh
GIT_UNZIP=${GIT_UNZIP:-unzip}
test_lazy_prereq UNZIP '
"$GIT_UNZIP" -v
test $? -ne 127
'
test_expect_success setup ' test_expect_success setup '
......
...@@ -3,15 +3,9 @@ ...@@ -3,15 +3,9 @@
test_description='git archive --format=zip test' test_description='git archive --format=zip test'
. ./test-lib.sh . ./test-lib.sh
GIT_UNZIP=${GIT_UNZIP:-unzip}
SUBSTFORMAT=%H%n SUBSTFORMAT=%H%n
test_lazy_prereq UNZIP '
"$GIT_UNZIP" -v
test $? -ne 127
'
test_lazy_prereq UNZIP_SYMLINKS ' test_lazy_prereq UNZIP_SYMLINKS '
( (
mkdir unzip-symlinks && mkdir unzip-symlinks &&
......
...@@ -750,3 +750,9 @@ test_lazy_prereq AUTOIDENT ' ...@@ -750,3 +750,9 @@ test_lazy_prereq AUTOIDENT '
# When the tests are run as root, permission tests will report that # When the tests are run as root, permission tests will report that
# things are writable when they shouldn't be. # things are writable when they shouldn't be.
test -w / || test_set_prereq SANITY test -w / || test_set_prereq SANITY
GIT_UNZIP=${GIT_UNZIP:-unzip}
test_lazy_prereq UNZIP '
"$GIT_UNZIP" -v
test $? -ne 127
'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册