summaryrefslogtreecommitdiff
path: root/testsuite/sed
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/sed')
-rw-r--r--testsuite/sed/sed-branch16
-rw-r--r--testsuite/sed/sed-branch-conditional15
-rw-r--r--testsuite/sed/sed-branch-no-label1
3 files changed, 17 insertions, 15 deletions
diff --git a/testsuite/sed/sed-branch b/testsuite/sed/sed-branch
index 47d0a5f..4167569 100644
--- a/testsuite/sed/sed-branch
+++ b/testsuite/sed/sed-branch
@@ -1,15 +1 @@
-busybox sed 's/a/1/;t one;p;: one;p'>output <<EOF
-a
-b
-c
-EOF
-cmp -s output - <<EOF
-1
-1
-b
-b
-b
-c
-c
-c
-EOF
+test "$(echo foo | busybox sed 'b one;p;: one')" = foo
diff --git a/testsuite/sed/sed-branch-conditional b/testsuite/sed/sed-branch-conditional
new file mode 100644
index 0000000..47d0a5f
--- /dev/null
+++ b/testsuite/sed/sed-branch-conditional
@@ -0,0 +1,15 @@
+busybox sed 's/a/1/;t one;p;: one;p'>output <<EOF
+a
+b
+c
+EOF
+cmp -s output - <<EOF
+1
+1
+b
+b
+b
+c
+c
+c
+EOF
diff --git a/testsuite/sed/sed-branch-no-label b/testsuite/sed/sed-branch-no-label
new file mode 100644
index 0000000..446c1bc
--- /dev/null
+++ b/testsuite/sed/sed-branch-no-label
@@ -0,0 +1 @@
+test "$(echo foo | busybox sed 'b;p')" = foo