diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-06-04 14:44:47 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-06-04 14:44:47 +0200 |
commit | 21f6fbf545e7fa58f0eaa444001a9d25bc37c4eb (patch) | |
tree | 17be754928b225ce5412faf1cbe613189fee14cd /testsuite | |
parent | 21f620f6e5f72c4cbecfecaf63a901c33911c00c (diff) | |
download | busybox-w32-21f6fbf545e7fa58f0eaa444001a9d25bc37c4eb.tar.gz busybox-w32-21f6fbf545e7fa58f0eaa444001a9d25bc37c4eb.tar.bz2 busybox-w32-21f6fbf545e7fa58f0eaa444001a9d25bc37c4eb.zip |
sed: fix zero chars match/replace
function old new delta
process_files 2099 2181 +82
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/sed.tests | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests index 9fa8e190c..375beb518 100755 --- a/testsuite/sed.tests +++ b/testsuite/sed.tests | |||
@@ -52,10 +52,8 @@ testing "sed with empty match" "sed 's/z*//g'" "string\n" "" "string\n" | |||
52 | testing "sed s//p" "sed -e s/foo/bar/p -e s/bar/baz/p" "bar\nbaz\nbaz\n" \ | 52 | testing "sed s//p" "sed -e s/foo/bar/p -e s/bar/baz/p" "bar\nbaz\nbaz\n" \ |
53 | "" "foo\n" | 53 | "" "foo\n" |
54 | testing "sed -n s//p" "sed -ne s/abc/def/p" "def\n" "" "abc\n" | 54 | testing "sed -n s//p" "sed -ne s/abc/def/p" "def\n" "" "abc\n" |
55 | test x"$SKIP_KNOWN_BUGS" = x"" && { | ||
56 | testing "sed s//g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5,\n" \ | 55 | testing "sed s//g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5,\n" \ |
57 | "" "12345\n" | 56 | "" "12345\n" |
58 | } | ||
59 | testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n" | 57 | testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n" |
60 | testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n" | 58 | testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n" |
61 | testing "sed s chains2" "sed -e s/foo/bar/ -e s/baz/nee/" "bar\n" "" "foo\n" | 59 | testing "sed s chains2" "sed -e s/foo/bar/ -e s/baz/nee/" "bar\n" "" "foo\n" |
@@ -296,6 +294,14 @@ testing "sed -i finishes ranges correctly" \ | |||
296 | "sed '1,2d' -i input; echo \$?; cat input" \ | 294 | "sed '1,2d' -i input; echo \$?; cat input" \ |
297 | "0\n3\n4\n" "1\n2\n3\n4\n" "" | 295 | "0\n3\n4\n" "1\n2\n3\n4\n" "" |
298 | 296 | ||
297 | testing "sed zero chars match/replace advances correctly 1" \ | ||
298 | "sed 's/l*/@/g'" \ | ||
299 | "@h@e@o@\n" "" "helllo\n" | ||
300 | |||
301 | testing "sed zero chars match/replace advances correctly 2" \ | ||
302 | "sed 's [^ .]* x g'" \ | ||
303 | "x x.x\n" "" " a.b\n" | ||
304 | |||
299 | # testing "description" "commands" "result" "infile" "stdin" | 305 | # testing "description" "commands" "result" "infile" "stdin" |
300 | 306 | ||
301 | exit $FAILCOUNT | 307 | exit $FAILCOUNT |