diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
commit | 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch) | |
tree | 63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /src/grep/tests/case-fold-backslash-w | |
parent | Initial commit. (diff) | |
download | kbuild-upstream/1%0.1.9998svn3589+dfsg.tar.xz kbuild-upstream/1%0.1.9998svn3589+dfsg.zip |
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/grep/tests/case-fold-backslash-w')
-rwxr-xr-x | src/grep/tests/case-fold-backslash-w | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/grep/tests/case-fold-backslash-w b/src/grep/tests/case-fold-backslash-w new file mode 100755 index 0000000..57ff0f5 --- /dev/null +++ b/src/grep/tests/case-fold-backslash-w @@ -0,0 +1,13 @@ +#!/bin/sh +# test that \W works on case-insensitive matches. It used to become \w. +# Derived from https://savannah.gnu.org/bugs/?28162 +. "${srcdir=.}/init.sh"; path_prepend_ ../src + +if echo foo bar | LANG=C.ASCII grep '^foo\W'; then + echo foo bar | LANG=C.ASCII grep -i '^foo\W' || fail_ ASCII insensitive +else + echo foo bar | LANG=C grep '^foo\W' || fail_ LANG=C sensitive + echo foo bar | LANG=C grep -i '^foo\W' || fail_ LANG=C insensitive +fi +echo foo bar | LANG=en_US.UTF-8 grep '^foo\W' || fail_ UTF-8 sensitive +echo foo bar | LANG=en_US.UTF-8 grep -i '^foo\W' || fail_ UTF-8 insensitive |