aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-23 15:59:20 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-23 15:59:20 -0800
commit972dfda5f6007855536876e50eb366873fcca86a (patch)
tree9133a843bcdbb8f3f2581044a1e743db11011898 /t
parent38f13709a6244ee9f900663b6d871dab94c82cdf (diff)
parent239039bd703e9f2286699de5aedae4c17defbbf1 (diff)
downloadgit-972dfda5f6007855536876e50eb366873fcca86a.tar.gz
git-972dfda5f6007855536876e50eb366873fcca86a.tar.xz
Merge branch 'sb/submodule-config-tests'
Test updates. * sb/submodule-config-tests: t7411: test lookup of uninitialized submodules t7411: quote URLs
Diffstat (limited to 't')
-rwxr-xr-xt/t7411-submodule-config.sh25
1 files changed, 23 insertions, 2 deletions
diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh
index d389ae540..eea36f1db 100755
--- a/t/t7411-submodule-config.sh
+++ b/t/t7411-submodule-config.sh
@@ -134,12 +134,33 @@ test_expect_success 'reading of local configuration' '
"" submodule \
>actual &&
test_cmp expect_local_path actual &&
- git config submodule.a.url $old_a &&
- git config submodule.submodule.url $old_submodule &&
+ git config submodule.a.url "$old_a" &&
+ git config submodule.submodule.url "$old_submodule" &&
git config --unset submodule.a.path c
)
'
+cat >super/expect_url <<EOF
+Submodule url: '../submodule' for path 'b'
+Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule'
+EOF
+
+test_expect_success 'reading of local configuration for uninitialized submodules' '
+ (
+ cd super &&
+ git submodule deinit -f b &&
+ old_submodule=$(git config submodule.submodule.url) &&
+ git config submodule.submodule.url git@somewhere.else.net:submodule.git &&
+ test-submodule-config --url \
+ "" b \
+ "" submodule \
+ >actual &&
+ test_cmp expect_url actual &&
+ git config submodule.submodule.url "$old_submodule" &&
+ git submodule init b
+ )
+'
+
cat >super/expect_fetchrecurse_die.err <<EOF
fatal: bad submodule.submodule.fetchrecursesubmodules argument: blabla
EOF