svn commit: r259444 - in stable/9: tools/regression/usr.bin/sed usr.bin/sed
Eitan Adler
eadler at FreeBSD.org
Mon Dec 16 01:22:58 UTC 2013
Author: eadler
Date: Mon Dec 16 01:22:57 2013
New Revision: 259444
URL: http://svnweb.freebsd.org/changeset/base/259444
Log:
MFC r259132,r259133:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
as a case insensitive flag.
Add regression test for recently added 'i' flag in r259132.
PR: standards/184641
Modified:
stable/9/tools/regression/usr.bin/sed/regress.sh
stable/9/usr.bin/sed/compile.c
stable/9/usr.bin/sed/sed.1
Modified: stable/9/tools/regression/usr.bin/sed/regress.sh
==============================================================================
--- stable/9/tools/regression/usr.bin/sed/regress.sh Mon Dec 16 01:20:18 2013 (r259443)
+++ stable/9/tools/regression/usr.bin/sed/regress.sh Mon Dec 16 01:22:57 2013 (r259444)
@@ -66,6 +66,7 @@ REGRESSION_TEST_FREEFORM(`inplace5', `in
REGRESSION_TEST(`icase1', `sed /SED/Id < regress.in')
REGRESSION_TEST(`icase2', `sed s/SED/Foo/I < regress.in')
REGRESSION_TEST(`icase3', `sed s/SED/Foo/ < regress.in')
+REGRESSION_TEST(`icase4', `sed s/SED/Foo/i < regress.in')
REGRESSION_TEST(`hanoi', `echo ":abcd: : :" | sed -f hanoi.sed')
REGRESSION_TEST(`math', `echo "4+7*3+2^7/3" | sed -f math.sed')
Modified: stable/9/usr.bin/sed/compile.c
==============================================================================
--- stable/9/usr.bin/sed/compile.c Mon Dec 16 01:20:18 2013 (r259443)
+++ stable/9/usr.bin/sed/compile.c Mon Dec 16 01:22:57 2013 (r259444)
@@ -582,6 +582,7 @@ compile_flags(char *p, struct s_subst *s
case 'p':
s->p = 1;
break;
+ case 'i':
case 'I':
s->icase = 1;
break;
Modified: stable/9/usr.bin/sed/sed.1
==============================================================================
--- stable/9/usr.bin/sed/sed.1 Mon Dec 16 01:20:18 2013 (r259443)
+++ stable/9/usr.bin/sed/sed.1 Mon Dec 16 01:22:57 2013 (r259444)
@@ -31,7 +31,7 @@
.\" @(#)sed.1 8.2 (Berkeley) 12/30/93
.\" $FreeBSD$
.\"
-.Dd May 24, 2009
+.Dd December 9, 2013
.Dt SED 1
.Os
.Sh NAME
@@ -196,7 +196,7 @@ option was specified);
a context address
that consists of a regular expression preceded and followed by a
delimiter. The closing delimiter can also optionally be followed by the
-.Dq I
+.Dq i
character, to indicate that the regular expression is to be matched
in a case-insensitive way.
.El
@@ -507,7 +507,7 @@ Append the pattern space to
if a replacement was made.
If the replacement string is identical to that which it replaces, it
is still considered to have been a replacement.
-.It I
+.It i or I
Match the regular expression in a case-insensitive way.
.El
.Pp
More information about the svn-src-stable-9
mailing list