2 # This would mistakenly print a line prior to grep-2.18.
3 .
"${srcdir=.}/init.sh"; path_prepend_ ..
/src
5 require_en_utf8_locale_
6 require_compiled_in_MB_support
8 encode
() { echo "$1" |
tr ABC
'\357\274\241'; }
13 encode _____________________ABCABC___
>exp4
17 for LOC
in en_US.UTF-8
$LOCALE_FR_UTF8; do
18 for pat
in A aA BCA
; do
19 for file in exp1 exp2 exp3 exp4
; do
20 for type in regex dfa fgrep
; do
23 fgrep
) opt
=-F prefix
= ;;
24 regex
) opt
= prefix
='\(\)\1' ;;
26 pattern
=$prefix$
(encode
$pat)
28 LC_ALL
=$LOC grep $opt "$pattern" $file >$out
30 echo $status >$out.status
31 if test $status -eq 0; then
33 elif test $status -eq 1; then
34 compare_dev_null_
/dev
/null
$out
38 compare out-regex-
$LOC.status
$out.status || fail
=1