Skip to content

Commit

Permalink
test: avoid shell issues with Solaris 10 (#172)
Browse files Browse the repository at this point in the history
avoiding export combined with assignment is also not valid POSIX sh
  • Loading branch information
carenas committed Dec 11, 2022
1 parent 5d523eb commit d598609
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions RunGrepTest
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ echo "---------------------------- Test 35 -----------------------------" >>test
echo "RC=$?" >>testtrygrep

echo "---------------------------- Test 36 -----------------------------" >>testtrygrep
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinput[^C] --exclude 'grepinput$' --exclude=grepinput8 --exclude=grepinputM --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include='grepinput[^C]' --exclude 'grepinput$' --exclude=grepinput8 --exclude=grepinputM --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
echo "RC=$?" >>testtrygrep

echo "---------------------------- Test 37 -----------------------------" >>testtrygrep
Expand Down Expand Up @@ -846,11 +846,7 @@ if [ $? -ne 0 ]; then
echo "RC=2" >>testtrygrep
else

# Bash has started giving a warning when LC_CTYPE is set to a bad value. In
# order to remain compatible with older versions, the following code is a bit
# contorted.

(cd $srcdir; unset LC_ALL; export LC_CTYPE=badlocale 2>/dev/null; $valgrind $vjs $pcre2grep abc /dev/null) >>testtrygrep 2>&1
(cd $srcdir; unset LC_ALL; env LC_CTYPE=badlocale $valgrind $vjs $pcre2grep abc /dev/null) >>testtrygrep 2>&1
echo "RC=$?" >>testtrygrep
fi

Expand Down

0 comments on commit d598609

Please sign in to comment.