summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/paste/paste20
-rw-r--r--testsuite/paste/paste-back-cuted-lines9
-rw-r--r--testsuite/paste/paste-multi-stdin16
-rw-r--r--testsuite/paste/paste-pairs16
-rw-r--r--testsuite/paste/paste-separate19
5 files changed, 80 insertions, 0 deletions
diff --git a/testsuite/paste/paste b/testsuite/paste/paste
new file mode 100644
index 0000000..349b49d
--- /dev/null
+++ b/testsuite/paste/paste
@@ -0,0 +1,20 @@
+cat > foo <<EOF
+foo1
+foo2
+foo3
+EOF
+
+cat > bar <<EOF
+bar1
+bar2
+bar3
+EOF
+
+cat > baz <<EOF
+foo1 bar1
+foo2 bar2
+foo3 bar3
+EOF
+
+busybox paste foo bar > qux
+diff -u baz qux
diff --git a/testsuite/paste/paste-back-cuted-lines b/testsuite/paste/paste-back-cuted-lines
new file mode 100644
index 0000000..a8171bf
--- /dev/null
+++ b/testsuite/paste/paste-back-cuted-lines
@@ -0,0 +1,9 @@
+cat > foo <<EOF
+this is the first line
+this is the second line
+this is the third line
+EOF
+cut -b 1-13 -n foo > foo1
+cut -b 14- -n foo > foo2
+busybox paste -d '\0' foo1 foo2 > bar
+cmp foo bar
diff --git a/testsuite/paste/paste-multi-stdin b/testsuite/paste/paste-multi-stdin
new file mode 100644
index 0000000..fee5430
--- /dev/null
+++ b/testsuite/paste/paste-multi-stdin
@@ -0,0 +1,16 @@
+cat > foo <<EOF
+line1
+line2
+line3
+line4
+line5
+line6
+EOF
+
+cat > bar <<EOF
+line1 line2 line3
+line4 line5 line6
+EOF
+
+busybox paste - - - < foo > baz
+cmp bar baz
diff --git a/testsuite/paste/paste-pairs b/testsuite/paste/paste-pairs
new file mode 100644
index 0000000..90725fa
--- /dev/null
+++ b/testsuite/paste/paste-pairs
@@ -0,0 +1,16 @@
+cat > foo <<EOF
+foo1
+bar1
+foo2
+bar2
+foo3
+EOF
+
+cat > bar <<EOF
+foo1 bar1
+foo2 bar2
+foo3
+EOF
+
+busybox paste -s -d "\t\n" foo > baz
+cmp bar baz
diff --git a/testsuite/paste/paste-separate b/testsuite/paste/paste-separate
new file mode 100644
index 0000000..40793fb
--- /dev/null
+++ b/testsuite/paste/paste-separate
@@ -0,0 +1,19 @@
+cat > foo <<EOF
+foo1
+foo2
+foo3
+EOF
+
+cat > bar <<EOF
+bar1
+bar2
+bar3
+EOF
+
+cat > baz <<EOF
+foo1 foo2 foo3
+bar1 bar2 bar3
+EOF
+
+busybox paste -s foo bar > qux
+cmp baz qux