diff options
Diffstat (limited to 'testsuite/sed.tests')
-rwxr-xr-x | testsuite/sed.tests | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests index 9fa8e190c..468565f47 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,22 @@ 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 | |||
305 | testing "sed zero chars match/replace logic must not falsely trigger here 1" \ | ||
306 | "sed 's/a/A/g'" \ | ||
307 | "_AAA1AA\n" "" "_aaa1aa\n" | ||
308 | |||
309 | testing "sed zero chars match/replace logic must not falsely trigger here 2" \ | ||
310 | "sed 's/ *$/_/g'" \ | ||
311 | "qwerty_\n" "" "qwerty\n" | ||
312 | |||
299 | # testing "description" "commands" "result" "infile" "stdin" | 313 | # testing "description" "commands" "result" "infile" "stdin" |
300 | 314 | ||
301 | exit $FAILCOUNT | 315 | exit $FAILCOUNT |