diff options
Diffstat (limited to 'testsuite/paste')
-rw-r--r-- | testsuite/paste/paste | 20 | ||||
-rw-r--r-- | testsuite/paste/paste-back-cuted-lines | 9 | ||||
-rw-r--r-- | testsuite/paste/paste-multi-stdin | 16 | ||||
-rw-r--r-- | testsuite/paste/paste-pairs | 16 | ||||
-rw-r--r-- | testsuite/paste/paste-separate | 19 |
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 @@ | |||
1 | cat > foo <<EOF | ||
2 | foo1 | ||
3 | foo2 | ||
4 | foo3 | ||
5 | EOF | ||
6 | |||
7 | cat > bar <<EOF | ||
8 | bar1 | ||
9 | bar2 | ||
10 | bar3 | ||
11 | EOF | ||
12 | |||
13 | cat > baz <<EOF | ||
14 | foo1 bar1 | ||
15 | foo2 bar2 | ||
16 | foo3 bar3 | ||
17 | EOF | ||
18 | |||
19 | busybox paste foo bar > qux | ||
20 | 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 000000000..a8171bf1e --- /dev/null +++ b/testsuite/paste/paste-back-cuted-lines | |||
@@ -0,0 +1,9 @@ | |||
1 | cat > foo <<EOF | ||
2 | this is the first line | ||
3 | this is the second line | ||
4 | this is the third line | ||
5 | EOF | ||
6 | cut -b 1-13 -n foo > foo1 | ||
7 | cut -b 14- -n foo > foo2 | ||
8 | busybox paste -d '\0' foo1 foo2 > bar | ||
9 | cmp 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 @@ | |||
1 | cat > foo <<EOF | ||
2 | line1 | ||
3 | line2 | ||
4 | line3 | ||
5 | line4 | ||
6 | line5 | ||
7 | line6 | ||
8 | EOF | ||
9 | |||
10 | cat > bar <<EOF | ||
11 | line1 line2 line3 | ||
12 | line4 line5 line6 | ||
13 | EOF | ||
14 | |||
15 | busybox paste - - - < foo > baz | ||
16 | cmp 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 @@ | |||
1 | cat > foo <<EOF | ||
2 | foo1 | ||
3 | bar1 | ||
4 | foo2 | ||
5 | bar2 | ||
6 | foo3 | ||
7 | EOF | ||
8 | |||
9 | cat > bar <<EOF | ||
10 | foo1 bar1 | ||
11 | foo2 bar2 | ||
12 | foo3 | ||
13 | EOF | ||
14 | |||
15 | busybox paste -s -d "\t\n" foo > baz | ||
16 | cmp 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 @@ | |||
1 | cat > foo <<EOF | ||
2 | foo1 | ||
3 | foo2 | ||
4 | foo3 | ||
5 | EOF | ||
6 | |||
7 | cat > bar <<EOF | ||
8 | bar1 | ||
9 | bar2 | ||
10 | bar3 | ||
11 | EOF | ||
12 | |||
13 | cat > baz <<EOF | ||
14 | foo1 foo2 foo3 | ||
15 | bar1 bar2 bar3 | ||
16 | EOF | ||
17 | |||
18 | busybox paste -s foo bar > qux | ||
19 | cmp baz qux | ||