VirtualBox

source: kBuild/trunk/src/grep/tests/case-fold-backslash-w@ 3532

Last change on this file since 3532 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: 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
6if echo foo bar | LANG=C.ASCII grep '^foo\W'; then
7 echo foo bar | LANG=C.ASCII grep -i '^foo\W' || fail_ ASCII insensitive
8else
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
11fi
12echo foo bar | LANG=en_US.UTF-8 grep '^foo\W' || fail_ UTF-8 sensitive
13echo 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.

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