summaryrefslogtreecommitdiff
path: root/t/t7518-ident-corner-cases.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7518-ident-corner-cases.sh')
-rwxr-xr-xt/t7518-ident-corner-cases.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7518-ident-corner-cases.sh b/t/t7518-ident-corner-cases.sh
index 667f110f59..b22f631261 100755
--- a/t/t7518-ident-corner-cases.sh
+++ b/t/t7518-ident-corner-cases.sh
@@ -22,4 +22,15 @@ test_expect_success 'commit rejects all-crud name' '
git commit --allow-empty -m foo
'
+# We must test the actual error message here, as an unwanted
+# auto-detection could fail for other reasons.
+test_expect_success 'empty configured name does not auto-detect' '
+ (
+ sane_unset GIT_AUTHOR_NAME &&
+ test_must_fail \
+ git -c user.name= commit --allow-empty -m foo 2>err &&
+ test_i18ngrep "empty ident name" err
+ )
+'
+
test_done