l10n: sv.po: Update Swedish translation (3288t0f0u)
[gitweb.git] / t / t7411-submodule-config.sh
index eea36f1dbe37859c5b45ca18bb3c8f1080ff3f9a..46c09c77654597b2ee501271b4688cc6137df8f1 100755 (executable)
@@ -31,6 +31,21 @@ test_expect_success 'submodule config cache setup' '
        )
 '
 
+test_expect_success 'configuration parsing with error' '
+       test_when_finished "rm -rf repo" &&
+       test_create_repo repo &&
+       cat >repo/.gitmodules <<-\EOF &&
+       [submodule "s"]
+               path
+               ignore
+       EOF
+       (
+               cd repo &&
+               test_must_fail test-submodule-config "" s 2>actual &&
+               test_i18ngrep "bad config" actual
+       )
+'
+
 cat >super/expect <<EOF
 Submodule name: 'a' for path 'a'
 Submodule name: 'a' for path 'b'
@@ -107,78 +122,6 @@ test_expect_success 'using different treeishs works' '
        )
 '
 
-cat >super/expect_url <<EOF
-Submodule url: 'git@somewhere.else.net:a.git' for path 'b'
-Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule'
-EOF
-
-cat >super/expect_local_path <<EOF
-Submodule name: 'a' for path 'c'
-Submodule name: 'submodule' for path 'submodule'
-EOF
-
-test_expect_success 'reading of local configuration' '
-       (cd super &&
-               old_a=$(git config submodule.a.url) &&
-               old_submodule=$(git config submodule.submodule.url) &&
-               git config submodule.a.url git@somewhere.else.net:a.git &&
-               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.a.path c &&
-               test-submodule-config \
-                       "" c \
-                       "" submodule \
-                               >actual &&
-               test_cmp expect_local_path actual &&
-               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
-
-test_expect_success 'local error in fetchrecursesubmodule dies early' '
-       (cd super &&
-               git config submodule.submodule.fetchrecursesubmodules blabla &&
-               test_must_fail test-submodule-config \
-                       "" b \
-                       "" submodule \
-                               >actual.out 2>actual.err &&
-               touch expect_fetchrecurse_die.out &&
-               test_cmp expect_fetchrecurse_die.out actual.out  &&
-               test_cmp expect_fetchrecurse_die.err actual.err  &&
-               git config --unset submodule.submodule.fetchrecursesubmodules
-       )
-'
-
 test_expect_success 'error in history in fetchrecursesubmodule lets continue' '
        (cd super &&
                git config -f .gitmodules \