aboutsummaryrefslogtreecommitdiff
path: root/testsuite/paste
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/paste')
-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 000000000..349b49d49
--- /dev/null
+++ b/testsuite/paste/paste
@@ -0,0 +1,20 @@
1cat > foo <<EOF
2foo1
3foo2
4foo3
5EOF
6
7cat > bar <<EOF
8bar1
9bar2
10bar3
11EOF
12
13cat > baz <<EOF
14foo1 bar1
15foo2 bar2
16foo3 bar3
17EOF
18
19busybox paste foo bar > qux
20diff -u baz qux
diff --git a/testsuite/paste/paste-back-cuted-lines b/testsuite/paste/paste-back-cuted-lines
new file mode 100644
index 000000000..a8171bf1e
--- /dev/null
+++ b/testsuite/paste/paste-back-cuted-lines
@@ -0,0 +1,9 @@
1cat > foo <<EOF
2this is the first line
3this is the second line
4this is the third line
5EOF
6cut -b 1-13 -n foo > foo1
7cut -b 14- -n foo > foo2
8busybox paste -d '\0' foo1 foo2 > bar
9cmp foo bar
diff --git a/testsuite/paste/paste-multi-stdin b/testsuite/paste/paste-multi-stdin
new file mode 100644
index 000000000..fee543058
--- /dev/null
+++ b/testsuite/paste/paste-multi-stdin
@@ -0,0 +1,16 @@
1cat > foo <<EOF
2line1
3line2
4line3
5line4
6line5
7line6
8EOF
9
10cat > bar <<EOF
11line1 line2 line3
12line4 line5 line6
13EOF
14
15busybox paste - - - < foo > baz
16cmp bar baz
diff --git a/testsuite/paste/paste-pairs b/testsuite/paste/paste-pairs
new file mode 100644
index 000000000..90725fa87
--- /dev/null
+++ b/testsuite/paste/paste-pairs
@@ -0,0 +1,16 @@
1cat > foo <<EOF
2foo1
3bar1
4foo2
5bar2
6foo3
7EOF
8
9cat > bar <<EOF
10foo1 bar1
11foo2 bar2
12foo3
13EOF
14
15busybox paste -s -d "\t\n" foo > baz
16cmp bar baz
diff --git a/testsuite/paste/paste-separate b/testsuite/paste/paste-separate
new file mode 100644
index 000000000..40793fb31
--- /dev/null
+++ b/testsuite/paste/paste-separate
@@ -0,0 +1,19 @@
1cat > foo <<EOF
2foo1
3foo2
4foo3
5EOF
6
7cat > bar <<EOF
8bar1
9bar2
10bar3
11EOF
12
13cat > baz <<EOF
14foo1 foo2 foo3
15bar1 bar2 bar3
16EOF
17
18busybox paste -s foo bar > qux
19cmp baz qux