Update sed branch tests
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 14 Sep 2003 11:10:08 +0000 (11:10 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 14 Sep 2003 11:10:08 +0000 (11:10 -0000)
testsuite/sed/sed-branch
testsuite/sed/sed-branch-conditional [new file with mode: 0644]
testsuite/sed/sed-branch-no-label [new file with mode: 0644]

index 47d0a5ff2526972c5d247bba9dc3ec881bf7e8ef..4167569adc7270b1cb3f246b12078fbf8209e3d9 100644 (file)
@@ -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 (file)
index 0000000..47d0a5f
--- /dev/null
@@ -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 (file)
index 0000000..446c1bc
--- /dev/null
@@ -0,0 +1 @@
+test "$(echo foo | busybox sed 'b;p')" = foo