summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorLibravatar Ed Maste <emaste@freebsd.org>2019-11-27 17:15:07 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-30 13:51:49 -0800
commit7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e (patch)
tree5dd93b6b270657f99bd074daf51583ad1c89b031 /t/test-lib.sh
parentThe first batch post 2.24 cycle (diff)
downloadtgif-7187c7bbb8184ec52726acdbe0eb2ddc98a4fb7e.tar.xz
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/test-lib.sh')
-rw-r--r--t/test-lib.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 46c4440843..3b2b8795fd 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1422,7 +1422,7 @@ else
'
fi
-# Fix some commands on Windows
+# Fix some commands on Windows, and other OS-specific things
uname_s=$(uname -s)
case $uname_s in
*MINGW*)
@@ -1453,6 +1453,12 @@ case $uname_s in
test_set_prereq SED_STRIPS_CR
test_set_prereq GREP_STRIPS_CR
;;
+FreeBSD)
+ test_set_prereq REGEX_ILLSEQ
+ test_set_prereq POSIXPERM
+ test_set_prereq BSLASHPSPEC
+ test_set_prereq EXECKEEPSPID
+ ;;
*)
test_set_prereq POSIXPERM
test_set_prereq BSLASHPSPEC