Skip to content

Commit b73b334

Browse files
committed
Discard new Bash LC_TYPE warning in RunGrepTest
1 parent b513504 commit b73b334

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ __stdcall.
7878
20. A negative repeat value in a pcre2test subject line was not being
7979
diagnosed, leading to infinite looping.
8080

81+
21. Updated RunGrepTest to discard the warning that Bash now gives when setting
82+
LC_CTYPE to an bad value (because older versions didn't).
83+
8184

8285
Version 10.40 15-April-2022
8386
---------------------------

RunGrepTest

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,12 @@ if [ $? -ne 0 ]; then
845845
echo "pcre2grep: Failed to set locale badlocale (obtained from LC_CTYPE)" >>testtrygrep
846846
echo "RC=2" >>testtrygrep
847847
else
848-
(cd $srcdir; unset LC_ALL; LC_CTYPE=badlocale $valgrind $vjs $pcre2grep abc /dev/null) >>testtrygrep 2>&1
848+
849+
# Bash has started giving a warning when LC_CTYPE is set to a bad value. In
850+
# order to remain compatible with older versions, the following code is a bit
851+
# contorted.
852+
853+
(cd $srcdir; unset LC_ALL; export LC_CTYPE=badlocale 2>/dev/null; $valgrind $vjs $pcre2grep abc /dev/null) >>testtrygrep 2>&1
849854
echo "RC=$?" >>testtrygrep
850855
fi
851856

0 commit comments

Comments
 (0)