t: test http access to "half-auth" repositories
[gitweb.git] / t / t7400-submodule-basic.sh
index 2b70b2298b53d5caba1337d9e1ce9c7fe3d21e19..81827e696f21f598357313d6dad94400d8562718 100755 (executable)
@@ -81,6 +81,13 @@ test_expect_success 'submodule add' '
                test ! -s actual &&
                echo "gitdir: ../.git/modules/submod" >expect &&
                test_cmp expect submod/.git &&
+               (
+                       cd submod &&
+                       git config core.worktree >actual &&
+                       echo "../../../submod" >expect &&
+                       test_cmp expect actual &&
+                       rm -f actual expect
+               ) &&
                git submodule init
        ) &&
 
@@ -227,7 +234,7 @@ EOF
 
 test_expect_success 'status should only print one line' '
        git submodule status >lines &&
-       test $(wc -l <lines) = 1
+       test_line_count = 1 lines
 '
 
 test_expect_success 'setup - fetch commit name from submodule' '
@@ -500,4 +507,17 @@ test_expect_success 'relative path works with user@host:path' '
        )
 '
 
+test_expect_success 'moving the superproject does not break submodules' '
+       (
+               cd addtest &&
+               git submodule status >expect
+       )
+       mv addtest addtest2 &&
+       (
+               cd addtest2 &&
+               git submodule status >actual &&
+               test_cmp expect actual
+       )
+'
+
 test_done