aboutsummaryrefslogtreecommitdiff
path: root/tests/sed.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-05-26 08:15:44 -0500
committerRob Landley <rob@landley.net>2019-05-26 08:15:44 -0500
commit6d2205e8131e9524ea3c3bb8cfd410a412c9fcaf (patch)
tree745958581be22fa7ef5a37f1843040903a64eac3 /tests/sed.test
parent1dbd86ec825ba92be12e4aafad49804faaa86ec6 (diff)
downloadtoybox-6d2205e8131e9524ea3c3bb8cfd410a412c9fcaf.tar.gz
Teach sed about +N range ending.
Diffstat (limited to 'tests/sed.test')
-rwxr-xr-xtests/sed.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/sed.test b/tests/sed.test
index e5ec11bd..98c109ad 100755
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -151,6 +151,12 @@ testing "trailing a\ (for debian)" "sed 'a\\'" "hello\n" "" "hello"
# You have to match the first line of a range in order to activate
# the range, numeric and ascii work the same way
testing "skip start of range" "sed -e n -e '1,2s/b/c/'" "a\nb\n" "" "a\nb\n"
+testing "range +1" "sed -ne '/blah/,+1p'" "blah\n6\n" "" \
+ "1\n2\n3\n4\n5\nblah\n6\n7\n8\n9\n"
+testing "range +0" "sed -ne '/blah/,+0p'" "blah\n" "" \
+ "1\n2\n3\n4\n5\nblah\n6\n7\n8\n9\n"
+testing "range +3" "sed -ne '2,+3p'" "2\n3\n4\n5\n" "" \
+ "1\n2\n3\n4\n5\nblah\n6\n7\n8\n9\n"
#echo meep | sed/sed -e '1a\' -e 'huh'
#echo blah | sed/sed -f <(echo -e "1a\\\\\nboom")