build: update gnulib to latest; and update bootstrap
[grep.git] / tests / char-class-multibyte
blobb957518831c03b7f893b45976b5086374e3c9837
1 #!/bin/sh
2 # This would segfault for grep-2.6
3 . "${srcdir=.}/init.sh"; path_prepend_ ../src
5 require_en_utf8_locale_
6 require_compiled_in_MB_support
8 printf \n' > exp1 || framework_failure_
9 fail=0
11 for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
12 out=out1-$LOC
13 printf \nç\né\n' | LC_ALL=$LOC grep '[é]' > $out || fail=1
14 compare exp1 $out || fail=1
15 done
17 printf \n' > exp2 || framework_failure_
19 for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
20 out=out2-$LOC
21 printf \nÇ\nÉ\n' | LC_ALL=$LOC grep '[É]' > $out || fail=1
22 compare exp2 $out || fail=1
23 done
25 for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
26 out=out3-$LOC
27 printf '\303\n' | returns_ 1 env LC_ALL=$LOC grep '[é]' > $out || fail=1
28 done
30 Exit $fail