build: update gnulib to latest; and update bootstrap
[grep.git] / tests / fgrep-infloop
blob015ec74dfa862a795909aaf45375c684e6d490c1
1 #!/bin/sh
2 # This would infloop for grep-2.6.1
3 . "${srcdir=.}/init.sh"; path_prepend_ ../src
5 require_en_utf8_locale_
6 require_timeout_
7 require_compiled_in_MB_support
9 encode() { echo "$1" | tr ABC '\357\274\241'; }
11 encode ABC > in || framework_failure_
12 fail=0
14 for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
15 out=out1-$LOC
16 LC_ALL=$LOC timeout 10s grep -F "$(encode BC)" in > $out
17 status=$?
18 if test $status -eq 0; then
19 compare in $out
20 elif test $status -eq 1; then
21 compare_dev_null_ /dev/null $out
22 else
23 test $status -eq 2
24 fi || fail=1
25 done
27 Exit $fail