Skip to content

Commit

Permalink
set LC_ALL=C so sed will not generate some messages about bad UTF-8
Browse files Browse the repository at this point in the history
    sed: RE error: illegal byte sequence
  • Loading branch information
ErwanMAS committed Oct 20, 2023
1 parent 41e295e commit 7193cf5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/custom/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ else
readlink=readlink
fi

if type gsed &>/dev/null ; then
sed=gsed
else
sed=sed
fi
LC_ALL=C

testdir=$(dirname "$0")
topdir=$($readlink -f "$testdir/../..")
Expand Down Expand Up @@ -111,7 +107,7 @@ run_testcase() {
printf "%d\n" $? > "$dir/res.code"
touch "$dir/empty"

$sed -i -e "s#$dir#.#g" "$dir/res.out" "$dir/res.err"
sed -i -e "s#$dir#.#g" "$dir/res.out" "$dir/res.err"

if ! cmp -s "$dir/res.err" "${err:-$dir/empty}"; then
[ $fail = 0 ] && printf "!\n"
Expand Down

0 comments on commit 7193cf5

Please sign in to comment.