ip link: add VLAN support
[oweals/busybox.git] / testsuite / sed.tests
index 9fa8e190c53ec1ce0a589ecbe463a773921f13b9..468565f47081280e9007d6ee80cc5687547900d1 100755 (executable)
@@ -52,10 +52,8 @@ testing "sed with empty match" "sed 's/z*//g'" "string\n" "" "string\n"
 testing "sed s//p" "sed -e s/foo/bar/p -e s/bar/baz/p" "bar\nbaz\nbaz\n" \
        "" "foo\n"
 testing "sed -n s//p" "sed -ne s/abc/def/p" "def\n" "" "abc\n"
-test x"$SKIP_KNOWN_BUGS" = x"" && {
 testing "sed s//g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5,\n" \
        "" "12345\n"
-}
 testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n"
 testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n"
 testing "sed s chains2" "sed -e s/foo/bar/ -e s/baz/nee/" "bar\n" "" "foo\n"
@@ -296,6 +294,22 @@ testing "sed -i finishes ranges correctly" \
        "sed '1,2d' -i input; echo \$?; cat input" \
        "0\n3\n4\n" "1\n2\n3\n4\n" ""
 
+testing "sed zero chars match/replace advances correctly 1" \
+       "sed 's/l*/@/g'" \
+       "@h@e@o@\n" "" "helllo\n"
+
+testing "sed zero chars match/replace advances correctly 2" \
+       "sed 's [^ .]* x g'" \
+       "x x.x\n" "" " a.b\n"
+
+testing "sed zero chars match/replace logic must not falsely trigger here 1" \
+       "sed 's/a/A/g'" \
+       "_AAA1AA\n" "" "_aaa1aa\n"
+
+testing "sed zero chars match/replace logic must not falsely trigger here 2" \
+       "sed 's/ *$/_/g'" \
+       "qwerty_\n" "" "qwerty\n"
+
 # testing "description" "commands" "result" "infile" "stdin"
 
 exit $FAILCOUNT