diff options
author | Bruno Haible <bruno@clisp.org> | 2023-03-03 13:28:07 +0100 |
---|---|---|
committer | Jim Meyering <meyering@meta.com> | 2023-03-05 07:10:37 -0800 |
commit | e00b27266a62ee5f6d16705087738dcae0191ae9 (patch) | |
tree | 2a2596343fb8a78cb4e97c12c1a901034d22deff | |
parent | c8603c9faf592f714065d25036145b18ebb13886 (diff) | |
download | grep-e00b27266a62ee5f6d16705087738dcae0191ae9.tar.gz |
tests: avoid failure on Alpine Linux 3.17, due to non-POSIX compliant tr
* tests/fmbtest: Don't use [x*n] syntax in the tr options, since tr from
BusyBox 1.35 does not support it.
-rwxr-xr-x | tests/fmbtest | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/fmbtest b/tests/fmbtest index e0d28d6e..e64b6baa 100755 --- a/tests/fmbtest +++ b/tests/fmbtest @@ -53,21 +53,21 @@ EOF for mode in F G E; do test1=$(echo $(LC_ALL=$cz grep -${mode} -f cspatfile csinput | - tr -cs '0-9' '[ *]')) + tr '\n' ' ' | tr -cd '0-9 ')) if test "$test1" != "11 12 13 14 15 16 17 18"; then echo "Test #1 ${mode} failed: $test1" failures=1 fi test2=$(echo $(LC_ALL=$cz grep -${mode}i -f cspatfile csinput | - tr -cs '0-9' '[ *]')) + tr '\n' ' ' | tr -cd '0-9 ')) if test "$test2" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then echo "Test #2 ${mode} failed: $test2" failures=1 fi test3=$(echo $(LC_ALL=$cz grep -${mode}i -e 'ČÍšE' -e 'Čas' csinput | - tr -cs '0-9' '[ *]')) + tr '\n' ' ' | tr -cd '0-9 ')) if test "$test3" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then echo "Test #3 ${mode} failed: $test3" failures=1 @@ -115,7 +115,7 @@ done for mode in G E; do test8=$(echo $(LC_ALL=$cz grep -${mode}i -e 'Č.šE' -e 'Č[a-f]s' csinput | - tr -cs '0-9' '[ *]')) + tr '\n' ' ' | tr -cd '0-9 ')) if test "$test8" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then echo "Test #8 ${mode} failed: $test8" failures=1 |