aboutsummaryrefslogtreecommitdiff
path: root/tests/sed.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sed.test')
-rwxr-xr-xtests/sed.test30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/sed.test b/tests/sed.test
index c62f9c4d..280b466a 100755
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -63,21 +63,21 @@ testing 'sed regex address overlap' 'sed -n /on/,/off/p' "on\nzap\noffon\n" "" \
# abcdDi
testing 'sed prodigaler newline' 'sed -e a\\ -e woo' 'one\nwoo\n' '' 'one'
-testing "sed aci" \
+testing "aci" \
"sed -e '3a boom' -e '/hre/i bang' -e '3a whack' -e '3c bong'" \
"one\ntwo\nbang\nbong\nboom\nwhack\nfour\n" "" \
"one\ntwo\nthree\nfour\n"
-testing "sed b loop" "sed ':woo;=;b woo' | head -n 5" '1\n1\n1\n1\n1\n' "" "X"
-testing "sed b skip" "sed -n '2b zap;d;:zap;p'" "two\n" "" "one\ntwo\nthree"
-testing "sed b end" "sed -n '2b;p'" "one\nthree" "" "one\ntwo\nthree"
-testing "sed c range" "sed '2,4c blah'" "one\nblah\nfive\nsix" "" \
+testing "b loop" "sed ':woo;=;b woo' | head -n 5" '1\n1\n1\n1\n1\n' "" "X"
+testing "b skip" "sed -n '2b zap;d;:zap;p'" "two\n" "" "one\ntwo\nthree"
+testing "b end" "sed -n '2b;p'" "one\nthree" "" "one\ntwo\nthree"
+testing "c range" "sed '2,4c blah'" "one\nblah\nfive\nsix" "" \
"one\ntwo\nthree\nfour\nfive\nsix"
-testing "sed c {range}" "sed -e '2,4{c blah' -e '}'" \
+testing "c {range}" "sed -e '2,4{c blah' -e '}'" \
"one\nblah\nblah\nblah\nfive\nsix" \
"" "one\ntwo\nthree\nfour\nfive\nsix"
-testing "sed c multiple continuation" \
+testing "c multiple continuation" \
"sed -e 'c\\' -e 'two\\' -e ''" "two\n\n" "" "hello"
-testing "sed D further processing depends on whether line is blank" \
+testing "D further processing depends on whether line is blank" \
"sed -e '/one/,/three/{' -e 'i meep' -e'N;2D;}'" \
"meep\nmeep\ntwo\nthree\n" "" "one\ntwo\nthree\n"
testing 'sed newline staying away' 'sed s/o/x/' 'xne\ntwx' '' 'one\ntwo'
@@ -88,7 +88,7 @@ testing 'sed newline staying away' 'sed s/o/x/' 'xne\ntwx' '' 'one\ntwo'
# all the s/// test
-testing "sed match empty line" "sed -e 's/^\$/@/'" "@\n" "" "\n"
+testing "match empty line" "sed -e 's/^\$/@/'" "@\n" "" "\n"
testing 'sed \1' "sed 's/t\\(w\\)o/za\\1py/'" "one\nzawpy\nthree" "" \
"one\ntwo\nthree"
@@ -112,12 +112,12 @@ testing 'sed s///#comment' "sed -e 's/TWO/four/i#comment'" "one\nfour\nthree" \
testing 'sed N flushes pending a and advances match counter' \
"sed -e 'a woo' -e 'N;\$p'" 'woo\none\ntwo\none\ntwo' "" 'one\ntwo'
-testing "sed delimiter in regex [char range] doesn't count" "sed -e 's/[/]//'" \
+testing "delimiter in regex [char range] doesn't count" "sed -e 's/[/]//'" \
"onetwo\n" "" 'one/two\n'
-testing "sed delete regex range start line after trigger" \
+testing "delete regex range start line after trigger" \
"sed -e '/one/,/three/{' -e 'i meep' -e '1D;}'" \
"meep\nmeep\ntwo\nmeep\nthree" "" "one\ntwo\nthree"
-testing "sed blank pattern repeats last pattern" \
+testing "blank pattern repeats last pattern" \
"sed -e '/^three/s//abc&def/'" \
"one two three\nabcthreedef four five\nfive six seven\n" "" \
"one two three\nthree four five\nfive six seven\n"
@@ -132,19 +132,19 @@ hello'" "merp\nhello\n" "" "merp"
testing "" "sed -e '/x/c\' -e 'y'" 'y\n' '' 'x\n'
testing "" "sed -e 's/a[([]*b/X/'" 'X' '' 'a[(b'
testing "" "sed 'y/a\\bc/de\f/'" "db\f" "" "abc"
-testing "sed [a-a] (for perl)" "sed '"'s/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g'"'" \
+testing "[a-a] (for perl)" "sed '"'s/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g'"'" \
'he\ llo' "" "he llo"
# You have to match the first line of a range in order to activate
# the range, numeric and ascii work the same way
-testing "sed skip start of range" "sed -e n -e '1,2s/b/c/'" "a\nb\n" "" "a\nb\n"
+testing "skip start of range" "sed -e n -e '1,2s/b/c/'" "a\nb\n" "" "a\nb\n"
#echo meep | sed/sed -e '1a\' -e 'huh'
#echo blah | sed/sed -f <(echo -e "1a\\\\\nboom")
#echo merp | sed/sed "1a\\
#hello"
-testing "sed bonus backslashes" \
+testing "bonus backslashes" \
"sed -e 'a \l \x\' -e \"\$(echo -e 'ab\\\nc')\"" \
"hello\nl x\nab\nc\n" "" "hello\n"
# -i with $ last line test