diff options
author | Brandon Williams <bmwill@google.com> | 2017-07-26 00:39:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-03 00:35:08 +0300 |
commit | 5ea50954d0632342d38bd1a4d86c5aa601ef5207 (patch) | |
tree | b1a1a625c02e243f850d9d609812a93522913725 /t/t7411-submodule-config.sh | |
parent | a46ddc992bbac524fb325875c5555dbae0c6355b (diff) |
t7411: check configuration parsing errors
Check for configuration parsing errors in '.gitmodules' in t7411, which
is explicitly testing the submodule-config subsystem, instead of in
t7400. Also explicitly use the test helper instead of relying on the
gitmodules file from being read in status.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7411-submodule-config.sh')
-rwxr-xr-x | t/t7411-submodule-config.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index eea36f1dbe..7d6b25ba23 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -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' |