summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin/sed
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2009-09-20 14:11:33 +0000
committerdds <dds@FreeBSD.org>2009-09-20 14:11:33 +0000
commit96199e6b701cfd47d391b0bc4fc2021e8099fc7d (patch)
treefcd1f8a174cab888ac760b6daf92ac9e692c7782 /tools/regression/usr.bin/sed
parent317812e953cee4b6f1caa75d2ee04837f6c96158 (diff)
downloadFreeBSD-src-96199e6b701cfd47d391b0bc4fc2021e8099fc7d.zip
FreeBSD-src-96199e6b701cfd47d391b0bc4fc2021e8099fc7d.tar.gz
Allow [ to be used as a delimiter.
Pointed by: Marius Strobl Obtained from: Apple
Diffstat (limited to 'tools/regression/usr.bin/sed')
-rw-r--r--tools/regression/usr.bin/sed/multitest.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/sed/multitest.t b/tools/regression/usr.bin/sed/multitest.t
index 53c14c5..fefc70b 100644
--- a/tools/regression/usr.bin/sed/multitest.t
+++ b/tools/regression/usr.bin/sed/multitest.t
@@ -432,6 +432,15 @@ u2/g' lines1
# POSIX does not say that this should work,
# but it does for GNU, BSD, and SunOS
mark '8.17' ; $SED -e 's/[/]/Q/' lines1
+
+ COMMENT='[ as an s delimiter and its escapes'
+ mark '8.18' ; $SED -e 's[_[X[' lines1
+ # This is a matter of interpretation
+ # POSIX 1003.1, 2004 says "Within the BRE and the replacement,
+ # the BRE delimiter itself can be used as a *literal* character
+ # if it is preceded by a backslash
+ mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X['
+ mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[['
}
test_error()
OpenPOWER on IntegriCloud