]> git.ipfire.org Git - thirdparty/git.git/commitdiff
scalar-diagnose: use "$GIT_UNZIP" in test
authorVictoria Dye <vdye@github.com>
Fri, 12 Aug 2022 20:10:09 +0000 (20:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Aug 2022 20:20:02 +0000 (13:20 -0700)
Use the "$GIT_UNZIP" test variable rather than verbatim 'unzip' to unzip the
'scalar diagnose' archive. Using "$GIT_UNZIP" is needed to run the Scalar
tests on systems where 'unzip' is not in the system path.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/scalar/t/t9099-scalar.sh

index 10b1172a8aa0d219f26a0f927c6bbf1800ba3a1c..fac86a57550c076cff7ddf6ce343a8ed20638b69 100755 (executable)
@@ -109,14 +109,14 @@ test_expect_success UNZIP 'scalar diagnose' '
        sed -n "s/.*$SQ\\(.*\\.zip\\)$SQ.*/\\1/p" <err >zip_path &&
        zip_path=$(cat zip_path) &&
        test -n "$zip_path" &&
-       unzip -v "$zip_path" &&
+       "$GIT_UNZIP" -v "$zip_path" &&
        folder=${zip_path%.zip} &&
        test_path_is_missing "$folder" &&
-       unzip -p "$zip_path" diagnostics.log >out &&
+       "$GIT_UNZIP" -p "$zip_path" diagnostics.log >out &&
        test_file_not_empty out &&
-       unzip -p "$zip_path" packs-local.txt >out &&
+       "$GIT_UNZIP" -p "$zip_path" packs-local.txt >out &&
        grep "$(pwd)/.git/objects" out &&
-       unzip -p "$zip_path" objects-local.txt >out &&
+       "$GIT_UNZIP" -p "$zip_path" objects-local.txt >out &&
        grep "^Total: [1-9]" out
 '