]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7416-submodule-dash-url.sh
mingw: fix quoting of arguments
[thirdparty/git.git] / t / t7416-submodule-dash-url.sh
index 459193c9765063f341c0aa17ee567073cd1b59ff..2966e9307199beb04c3a61933ad88a1d3e6bcb5b 100755 (executable)
@@ -31,4 +31,18 @@ test_expect_success 'clone rejects unprotected dash' '
        test_i18ngrep ignoring err
 '
 
+test_expect_success 'trailing backslash is handled correctly' '
+       git init testmodule &&
+       test_commit -C testmodule c &&
+       git submodule add ./testmodule &&
+       : ensure that the name ends in a double backslash &&
+       sed -e "s|\\(submodule \"testmodule\\)\"|\\1\\\\\\\\\"|" \
+               -e "s|url = .*|url = \" --should-not-be-an-option\"|" \
+               <.gitmodules >.new &&
+       mv .new .gitmodules &&
+       git commit -am "Add testmodule" &&
+       test_must_fail git clone --verbose --recurse-submodules . dolly 2>err &&
+       test_i18ngrep ! "unknown option" err
+'
+
 test_done