|
Last change
on this file was 2595, checked in by bird, 12 years ago |
|
gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)
|
|
File size:
595 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | # test that \W works on case-insensitive matches. It used to become \w.
|
|---|
| 3 | # Derived from https://savannah.gnu.org/bugs/?28162
|
|---|
| 4 | . "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|---|
| 5 |
|
|---|
| 6 | if echo foo bar | LANG=C.ASCII grep '^foo\W'; then
|
|---|
| 7 | echo foo bar | LANG=C.ASCII grep -i '^foo\W' || fail_ ASCII insensitive
|
|---|
| 8 | else
|
|---|
| 9 | echo foo bar | LANG=C grep '^foo\W' || fail_ LANG=C sensitive
|
|---|
| 10 | echo foo bar | LANG=C grep -i '^foo\W' || fail_ LANG=C insensitive
|
|---|
| 11 | fi
|
|---|
| 12 | echo foo bar | LANG=en_US.UTF-8 grep '^foo\W' || fail_ UTF-8 sensitive
|
|---|
| 13 | echo foo bar | LANG=en_US.UTF-8 grep -i '^foo\W' || fail_ UTF-8 insensitive
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.