diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2024-12-10 18:49:10 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2024-12-10 18:49:10 +0100 |
commit | a208fa03de8467d1f51821f874cbf142aaad74fa (patch) | |
tree | 6be938db44130fb080ea7a68bcfd4f37662dc4a1 /testsuite | |
parent | b402b13fab027185e460a4020ee0a0b897bba441 (diff) | |
download | busybox-w32-a208fa03de8467d1f51821f874cbf142aaad74fa.tar.gz busybox-w32-a208fa03de8467d1f51821f874cbf142aaad74fa.tar.bz2 busybox-w32-a208fa03de8467d1f51821f874cbf142aaad74fa.zip |
cut: implement --output-delimiter
function old new delta
cut_main 1204 1261 +57
static.cut_longopts - 20 +20
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 77/0) Total: 77 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/cut.tests | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/testsuite/cut.tests b/testsuite/cut.tests index 46ef545d7..ba5f88d60 100755 --- a/testsuite/cut.tests +++ b/testsuite/cut.tests | |||
@@ -23,14 +23,30 @@ the quick brown fox jumps over the lazy dog | |||
23 | 23 | ||
24 | testing "cut -b a,a,a" "cut -b 3,3,3 input" "e\np\ne\n" "$abc" "" | 24 | testing "cut -b a,a,a" "cut -b 3,3,3 input" "e\np\ne\n" "$abc" "" |
25 | 25 | ||
26 | testing "cut -b overlaps" "cut -b 1-3,2-5,7-9,9-10 input" \ | 26 | testing "cut -b overlaps" \ |
27 | "one:to:th\nalphabeta\nthe qick \n" "$abc" "" | 27 | "cut -b 1-3,2-5,7-9,9-10 input" \ |
28 | testing "-b encapsulated" "cut -b 3-8,4-6 input" "e:two:\npha:be\ne quic\n" \ | 28 | "\ |
29 | "$abc" "" | 29 | one:to:th |
30 | # --output-delimiter not implemnted (yet?) | 30 | alphabeta |
31 | #testing "cut -bO overlaps" \ | 31 | the qick \n" \ |
32 | # "cut --output-delimiter ' ' -b 1-3,2-5,7-9,9-10 input" \ | 32 | "$abc" "" |
33 | # "one:t o:th\nalpha beta\nthe q ick \n" "$abc" "" | 33 | testing "-b encapsulated" \ |
34 | "cut -b 3-8,4-6 input" \ | ||
35 | "\ | ||
36 | e:two: | ||
37 | pha:be | ||
38 | e quic\n" \ | ||
39 | "$abc" "" | ||
40 | optional LONG_OPTS | ||
41 | testing "cut -b --output-delimiter overlaps" \ | ||
42 | "cut --output-delimiter='^' -b 1-3,2-5,7-9,9-10 input" \ | ||
43 | "\ | ||
44 | one:t^o:th | ||
45 | alpha^beta | ||
46 | the q^ick \n" \ | ||
47 | "$abc" "" | ||
48 | SKIP= | ||
49 | |||
34 | testing "cut high-low error" "cut -b 8-3 input 2>/dev/null || echo err" "err\n" \ | 50 | testing "cut high-low error" "cut -b 8-3 input 2>/dev/null || echo err" "err\n" \ |
35 | "$abc" "" | 51 | "$abc" "" |
36 | 52 | ||