VirtualBox

source: kBuild/vendor/grep/3.7/tests/char-class-multibyte@ 3576

Last change on this file since 3576 was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

  • Property svn:executable set to *
File size: 729 bytes
Line 
1#!/bin/sh
2# This would segfault for grep-2.6
3. "${srcdir=.}/init.sh"; path_prepend_ ../src
4
5require_en_utf8_locale_
6require_compiled_in_MB_support
7
8printf 'é\n' > exp1 || framework_failure_
9fail=0
10
11for 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
15done
16
17printf 'É\n' > exp2 || framework_failure_
18
19for 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
23done
24
25for 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
28done
29
30Exit $fail
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette