]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5003-archive-zip.sh
archive --add-virtual-file: allow paths containing colons
[thirdparty/git.git] / t / t5003-archive-zip.sh
index d6027189e2565dd5c790631d5febf254cb3214c8..3992d08158a29ee8a9a1b73a7f7b6446308b2e6a 100755 (executable)
@@ -207,13 +207,21 @@ check_zip with_untracked
 check_added with_untracked untracked untracked
 
 test_expect_success UNZIP 'git archive --format=zip --add-virtual-file' '
+       if test_have_prereq FUNNYNAMES
+       then
+               PATHNAME="pathname with : colon"
+       else
+               PATHNAME="pathname without colon"
+       fi &&
        git archive --format=zip >with_file_with_content.zip \
+               --add-virtual-file=\""$PATHNAME"\": \
                --add-virtual-file=hello:world $EMPTY_TREE &&
        test_when_finished "rm -rf tmp-unpack" &&
        mkdir tmp-unpack && (
                cd tmp-unpack &&
                "$GIT_UNZIP" ../with_file_with_content.zip &&
                test_path_is_file hello &&
+               test_path_is_file "$PATHNAME" &&
                test world = $(cat hello)
        )
 '