aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-10-29 01:30:58 -0500
committerRob Landley <rob@landley.net>2015-10-29 01:30:58 -0500
commit8132ad2f4ec9b463ed954a302e9e490b549b106a (patch)
tree66f7647b93f7245c8ad9f4dc03d298a4444f45d6 /tests
parentda646636382e5830650e725592d10cec587081f7 (diff)
downloadtoybox-8132ad2f4ec9b463ed954a302e9e490b549b106a.tar.gz
Fix sed bug reported by Isabella Parakiss, where sed -e "/x/c\" -e "y" added
an extra newline because the test for whether we have an existing string to append a newline to was checking if struct step had data appended to it, and the /x/ regex is data appended to it. Change test to check for null terminator at ->arg1 offset.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sed.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/sed.test b/tests/sed.test
index 9f2956f8..56d68fdb 100755
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -127,6 +127,9 @@ testing "" "sed -e '1a\' -e 'huh'" "meep\nhuh\n" "" "meep"
testing "" "sed -f input" "blah\nboom\n" '1a\\\nboom' 'blah'
testing "" "sed '1a\
hello'" "merp\nhello\n" "" "merp"
+
+testing "" "sed -e '/x/c\' -e 'y'" 'y\n' '' 'x\n'
+
#echo meep | sed/sed -e '1a\' -e 'huh'
#echo blah | sed/sed -f <(echo -e "1a\\\\\nboom")
#echo merp | sed/sed "1a\\