summaryrefslogtreecommitdiff
path: root/t/t4210-log-i18n.sh
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2019-11-27 17:15:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-30 21:51:49 (GMT)
commit7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e (patch)
tree5dd93b6b270657f99bd074daf51583ad1c89b031 /t/t4210-log-i18n.sh
parentd9f6f3b6195a0ca35642561e530798ad1469bd41 (diff)
downloadgit-7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e.zip
git-7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e.tar.gz
git-7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e.tar.bz2
t4210: skip i18n tests that don't work on FreeBSD
A number of t4210-log-i18n tests added in 4e2443b181 set LC_ALL to a UTF-8 locale (is_IS.UTF-8) but then pass an invalid UTF-8 string to --grep. FreeBSD's regcomp() fails in this case with REG_ILLSEQ, "illegal byte sequence," which git then passes to die(): fatal: command line: '�': illegal byte sequence When these tests were added the commit message stated: | It's possible that this | test breaks the "basic" and "extended" backends on some systems that | are more anal than glibc about the encoding of locale issues with | POSIX functions that I can remember which seems to be the case here. Extend test-lib.sh to add a REGEX_ILLSEQ prereq, set it on FreeBSD, and add !REGEX_ILLSEQ to the two affected tests. Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4210-log-i18n.sh')
-rwxr-xr-xt/t4210-log-i18n.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh
index 6e61f57..c379208 100755
--- a/t/t4210-log-i18n.sh
+++ b/t/t4210-log-i18n.sh
@@ -70,7 +70,7 @@ do
then
force_regex=.*
fi
- test_expect_success !MINGW,GETTEXT_LOCALE,$prereq "-c grep.patternType=$engine log --grep does not find non-reencoded values (latin1 + locale)" "
+ test_expect_success !MINGW,!REGEX_ILLSEQ,GETTEXT_LOCALE,$prereq "-c grep.patternType=$engine log --grep does not find non-reencoded values (latin1 + locale)" "
cat >expect <<-\EOF &&
latin1
utf8
@@ -84,7 +84,7 @@ do
test_must_be_empty actual
"
- test_expect_success !MINGW,GETTEXT_LOCALE,$prereq "-c grep.patternType=$engine log --grep does not die on invalid UTF-8 value (latin1 + locale + invalid needle)" "
+ test_expect_success !MINGW,!REGEX_ILLSEQ,GETTEXT_LOCALE,$prereq "-c grep.patternType=$engine log --grep does not die on invalid UTF-8 value (latin1 + locale + invalid needle)" "
LC_ALL=\"$is_IS_locale\" git -c grep.patternType=$engine log --encoding=ISO-8859-1 --format=%s --grep=\"$force_regex$invalid_e\" >actual &&
test_must_be_empty actual
"