From 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:21:29 +0200 Subject: Adding upstream version 1:0.1.9998svn3589+dfsg. Signed-off-by: Daniel Baumann --- src/grep/tests/case-fold-backslash-w | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 src/grep/tests/case-fold-backslash-w (limited to 'src/grep/tests/case-fold-backslash-w') 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 -- cgit v1.2.3