add a test for semantic errors in config files
[gitweb.git] / t / t1308-config-set.sh
index 7fdf840b0020fb626118d056693b0e6be92bc1ac..9cc678d90b4e4f753c7586dea385ef2ad3431db8 100755 (executable)
@@ -197,4 +197,15 @@ test_expect_success 'proper error on error in custom config files' '
        test_cmp expect actual
 '
 
+test_expect_success 'check line errors for malformed values' '
+       mv .git/config .git/config.old &&
+       test_when_finished "mv .git/config.old .git/config" &&
+       cat >.git/config <<-\EOF &&
+       [alias]
+               br
+       EOF
+       test_expect_code 128 git br 2>result &&
+       test_i18ngrep "fatal: .*alias\.br.*\.git/config.*line 2" result
+'
+
 test_done