diff options
Diffstat (limited to 'testsuite/sed')
-rw-r--r-- | testsuite/sed/sed-chains-substs | 1 | ||||
-rw-r--r-- | testsuite/sed/sed-handles-embedded-slashes | 1 | ||||
-rw-r--r-- | testsuite/sed/sed-handles-empty-lines | 1 | ||||
-rw-r--r-- | testsuite/sed/sed-handles-unsatisfied-backrefs | 6 | ||||
-rw-r--r-- | testsuite/sed/sed-prints-line-once-for-multiple-substs | 4 |
5 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/sed/sed-chains-substs b/testsuite/sed/sed-chains-substs new file mode 100644 index 000000000..266936ac4 --- /dev/null +++ b/testsuite/sed/sed-chains-substs @@ -0,0 +1 @@ +test "$(echo foo | busybox sed -e s/foo/bar/ -e s/bar/baz/)" = baz diff --git a/testsuite/sed/sed-handles-embedded-slashes b/testsuite/sed/sed-handles-embedded-slashes new file mode 100644 index 000000000..cc287613d --- /dev/null +++ b/testsuite/sed/sed-handles-embedded-slashes @@ -0,0 +1 @@ +test "$(echo fu/bar | busybox sed -e 's/[/]//')" = fubar diff --git a/testsuite/sed/sed-handles-empty-lines b/testsuite/sed/sed-handles-empty-lines new file mode 100644 index 000000000..2bb8f045a --- /dev/null +++ b/testsuite/sed/sed-handles-empty-lines @@ -0,0 +1 @@ +test `echo | busybox sed -e 's/$/@/'` = @ diff --git a/testsuite/sed/sed-handles-unsatisfied-backrefs b/testsuite/sed/sed-handles-unsatisfied-backrefs new file mode 100644 index 000000000..61bff8837 --- /dev/null +++ b/testsuite/sed/sed-handles-unsatisfied-backrefs @@ -0,0 +1,6 @@ +busybox sed -e 's/.*root=/\1/' >output <<EOF +BOOT_IMAGE=vmlinuz root=/dev/hda5 initrd=init1 +EOF +cmp -s output - <<EOF +/dev/hda5 initrd=init1 +EOF diff --git a/testsuite/sed/sed-prints-line-once-for-multiple-substs b/testsuite/sed/sed-prints-line-once-for-multiple-substs new file mode 100644 index 000000000..ba8955d6e --- /dev/null +++ b/testsuite/sed/sed-prints-line-once-for-multiple-substs @@ -0,0 +1,4 @@ +busybox sed -e s/1/2/g -e s/3/4/g >output <<EOF +1 +EOF +echo 2 | cmp -s output - |