paste: new applet
function old new delta paste_main - 493 +493 packed_usage 31019 31070 +51 applet_names 2569 2575 +6 applet_main 1484 1488 +4 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/0 up/down: 554/0) Total: 554 bytes Signed-off-by: Maxime Coste <mawww@kakoune.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
dba0dc1999
commit
d2383f57cd
20
testsuite/paste/paste
Normal file
20
testsuite/paste/paste
Normal file
@@ -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
|
9
testsuite/paste/paste-back-cuted-lines
Normal file
9
testsuite/paste/paste-back-cuted-lines
Normal file
@@ -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
|
16
testsuite/paste/paste-multi-stdin
Normal file
16
testsuite/paste/paste-multi-stdin
Normal file
@@ -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
|
16
testsuite/paste/paste-pairs
Normal file
16
testsuite/paste/paste-pairs
Normal file
@@ -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
|
19
testsuite/paste/paste-separate
Normal file
19
testsuite/paste/paste-separate
Normal file
@@ -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
|
Reference in New Issue
Block a user