sha1-file.c: mark more strings for translation
[gitweb.git] / t / t7400-submodule-basic.sh
index b5b4922aba72d18c221571a1523d3d5785923797..d6853e94bed56ade8711e86e662063cb99f5755a 100755 (executable)
@@ -126,8 +126,10 @@ test_expect_success 'submodule add' '
        test_cmp empty untracked
 '
 
-test_create_repo parent &&
-test_commit -C parent one
+test_expect_success 'setup parent and one repository' '
+       test_create_repo parent &&
+       test_commit -C parent one
+'
 
 test_expect_success 'redirected submodule add does not show progress' '
        git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
@@ -375,7 +377,7 @@ test_expect_success 'init should register submodule url in .git/config' '
 
 test_failure_with_unknown_submodule () {
        test_must_fail git submodule $1 no-such-submodule 2>output.err &&
-       grep "^error: .*no-such-submodule" output.err
+       test_i18ngrep "^error: .*no-such-submodule" output.err
 }
 
 test_expect_success 'init should fail with unknown submodule' '
@@ -837,6 +839,21 @@ test_expect_success 'moving the superproject does not break submodules' '
        )
 '
 
+test_expect_success 'moving the submodule does not break the superproject' '
+       (
+               cd addtest2 &&
+               git submodule status
+       ) >actual &&
+       sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect &&
+       mv addtest2/repo addtest2/repo.bak &&
+       test_when_finished "mv addtest2/repo.bak addtest2/repo" &&
+       (
+               cd addtest2 &&
+               git submodule status
+       ) >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'submodule add --name allows to replace a submodule with another at the same path' '
        (
                cd addtest2 &&