summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin/sed
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2007-04-02 08:14:46 +0000
committeryar <yar@FreeBSD.org>2007-04-02 08:14:46 +0000
commitd1f2d71a20a71a7677a23d9186db3bcf9732ae91 (patch)
tree4d4c93e2f77d47665b55333133bf5aa5c3b8f7ab /tools/regression/usr.bin/sed
parent03cf2678d28b868b3e66659a634c7932527eef53 (diff)
downloadFreeBSD-src-d1f2d71a20a71a7677a23d9186db3bcf9732ae91.zip
FreeBSD-src-d1f2d71a20a71a7677a23d9186db3bcf9732ae91.tar.gz
Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely. Otherwise the unclosed range would bogusly extend to the end of stream. Add a basic regression test for the bug fixed. (This change also fixes the more complex case 5.3 from `multitest.t'.) Compared with: SUN and GNU seds Tested by: regression tests MFC after: 1 week
Diffstat (limited to 'tools/regression/usr.bin/sed')
-rw-r--r--tools/regression/usr.bin/sed/regress.b2a.out3
-rw-r--r--tools/regression/usr.bin/sed/regress.sh4
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/regression/usr.bin/sed/regress.b2a.out b/tools/regression/usr.bin/sed/regress.b2a.out
new file mode 100644
index 0000000..a44df51
--- /dev/null
+++ b/tools/regression/usr.bin/sed/regress.b2a.out
@@ -0,0 +1,3 @@
+data
+for validation
+of sed(1)
diff --git a/tools/regression/usr.bin/sed/regress.sh b/tools/regression/usr.bin/sed/regress.sh
index 3e7ba5f..5e06b11 100644
--- a/tools/regression/usr.bin/sed/regress.sh
+++ b/tools/regression/usr.bin/sed/regress.sh
@@ -2,7 +2,7 @@
REGRESSION_START($1)
-echo '1..15'
+echo '1..16'
REGRESSION_TEST(`G', `sed G < regress.in')
REGRESSION_TEST(`P', `sed P < regress.in')
@@ -27,5 +27,7 @@ foo
REGRESSION_TEST(`c3', `sed ''`3,/no such string/c\
foo
''`< regress.in')
+REGRESSION_TEST(`b2a', `sed ''`2,3b
+1,2d''` < regress.in')
REGRESSION_END()
OpenPOWER on IntegriCloud