diff options
author | ssouhlal <ssouhlal@FreeBSD.org> | 2007-07-04 16:42:41 +0000 |
---|---|---|
committer | ssouhlal <ssouhlal@FreeBSD.org> | 2007-07-04 16:42:41 +0000 |
commit | e75185f7f5535425e6275fd11573ca3630df635b (patch) | |
tree | ace649ddfd510577b7ffbba46012b768a27d0dde /tools/regression | |
parent | 2e6ed0bb0287a6dbda884e9b1969bf9a332e41dd (diff) | |
download | FreeBSD-src-e75185f7f5535425e6275fd11573ca3630df635b.zip FreeBSD-src-e75185f7f5535425e6275fd11573ca3630df635b.tar.gz |
Add case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.
For example,
sed /foo/Id
sed s/foo/bar/Ig
Reviewed by: dds
Approved by: re (hrs)
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/usr.bin/sed/regress.icase1.out | 3 | ||||
-rw-r--r-- | tools/regression/usr.bin/sed/regress.icase2.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/sed/regress.sh | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/sed/regress.icase1.out b/tools/regression/usr.bin/sed/regress.icase1.out new file mode 100644 index 0000000..a610a0b --- /dev/null +++ b/tools/regression/usr.bin/sed/regress.icase1.out @@ -0,0 +1,3 @@ +input +data +for validation diff --git a/tools/regression/usr.bin/sed/regress.icase2.out b/tools/regression/usr.bin/sed/regress.icase2.out new file mode 100644 index 0000000..b803373 --- /dev/null +++ b/tools/regression/usr.bin/sed/regress.icase2.out @@ -0,0 +1,4 @@ +input +data +for validation +of Foo(1) diff --git a/tools/regression/usr.bin/sed/regress.sh b/tools/regression/usr.bin/sed/regress.sh index 520abd5..64518a6 100644 --- a/tools/regression/usr.bin/sed/regress.sh +++ b/tools/regression/usr.bin/sed/regress.sh @@ -63,6 +63,9 @@ REGRESSION_TEST_FREEFORM(`inplace3', `inplace_test 20,99d') REGRESSION_TEST_FREEFORM(`inplace4', `inplace_test "{;{;8,30d;};}"') REGRESSION_TEST_FREEFORM(`inplace5', `inplace_test "3x;6G"') +REGRESSION_TEST(`icase1', `sed /SED/Id < regress.in') +REGRESSION_TEST(`icase2', `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') |