]> git.ipfire.org Git - thirdparty/git.git/blame - t/t7518-ident-corner-cases.sh
ident: handle NULL email when complaining of empty name
[thirdparty/git.git] / t / t7518-ident-corner-cases.sh
CommitLineData
862e80a4
JK
1#!/bin/sh
2
3test_description='corner cases in ident strings'
4. ./test-lib.sh
5
6# confirm that we do not segfault _and_ that we do not say "(null)", as
7# glibc systems will quietly handle our NULL pointer
8#
9# Note also that we can't use "env" here because we need to unset a variable,
10# and "-u" is not portable.
11test_expect_success 'empty name and missing email' '
12 (
13 sane_unset GIT_AUTHOR_EMAIL &&
14 GIT_AUTHOR_NAME= &&
15 test_must_fail git commit --allow-empty -m foo 2>err &&
16 test_i18ngrep ! null err
17 )
18'
19
20test_done