summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2016-07-21 18:02:54 +0200
committerJunio C Hamano <gitster@pobox.com>2017-01-27 10:55:26 -0800
commitd98b2c5fce0ae4ee3fbe34037798460d59e28432 (patch)
treed656e3be7ee8c38569accc189fd36ae0cd7f1b3f
parentad36dc8b4b165bf9eb3576b42a241164e312d48c (diff)
downloadgit-js/unzip-in-usr-bin-workaround.tar.gz
test-lib: on FreeBSD, look for unzip(1) in /usr/local/bin/js/unzip-in-usr-bin-workaround
Eric Wong reported that while FreeBSD has a /usr/bin/unzip, it uses different semantics from those that are needed by Git's tests: When passing the -a option to Info-Zip, it heeds the text attribute of the .zip file's central directory, while FreeBSD's unzip ignores that attribute. The common work-around is to install Info-Zip on FreeBSD, into /usr/local/bin/. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--t/test-lib.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index cde7fc7fcf..86d77c16dd 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -966,7 +966,8 @@ yes () {
}
# Fix some commands on Windows
-case $(uname -s) in
+uname_s=$(uname -s)
+case $uname_s in
*MINGW*)
# Windows has its own (incompatible) sort and find
sort () {
@@ -1141,6 +1142,7 @@ test_lazy_prereq SANITY '
return $status
'
+test FreeBSD != $uname_s || GIT_UNZIP=${GIT_UNZIP:-/usr/local/bin/unzip}
GIT_UNZIP=${GIT_UNZIP:-unzip}
test_lazy_prereq UNZIP '
"$GIT_UNZIP" -v