diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-03 07:21:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-03 07:21:27 +0000 |
commit | 96b99b860cc15f13b85b1b2d5b5b20ab7183a652 (patch) | |
tree | f7f5236085dcc40f02bd29078900d971a787344e /testsuite/uniq.tests | |
parent | 687a26fe0dcf10f227cb0541882d1daa8a21991d (diff) | |
download | busybox-w32-96b99b860cc15f13b85b1b2d5b5b20ab7183a652.tar.gz busybox-w32-96b99b860cc15f13b85b1b2d5b5b20ab7183a652.tar.bz2 busybox-w32-96b99b860cc15f13b85b1b2d5b5b20ab7183a652.zip |
uniq: support -w. closes bug 3094.
function old new delta
packed_usage 24136 24132 -4
uniq_main 399 384 -15
Diffstat (limited to 'testsuite/uniq.tests')
-rwxr-xr-x | testsuite/uniq.tests | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/uniq.tests b/testsuite/uniq.tests index 49d4bed9c..8961d669c 100755 --- a/testsuite/uniq.tests +++ b/testsuite/uniq.tests | |||
@@ -41,6 +41,7 @@ testing "uniq input - (specify stdout)" "uniq input -" \ | |||
41 | #-c occurrences | 41 | #-c occurrences |
42 | #-d dups only | 42 | #-d dups only |
43 | #-u | 43 | #-u |
44 | #-w max chars | ||
44 | 45 | ||
45 | # Test various command line options | 46 | # Test various command line options |
46 | 47 | ||
@@ -60,6 +61,22 @@ aa bb cc9 | |||
60 | bb cc dd8 | 61 | bb cc dd8 |
61 | aa bb cc9 | 62 | aa bb cc9 |
62 | " | 63 | " |
64 | testing "uniq -w (compare max characters)" "uniq -w 2" \ | ||
65 | "cc1 | ||
66 | " "" \ | ||
67 | "cc1 | ||
68 | cc2 | ||
69 | cc3 | ||
70 | " | ||
71 | |||
72 | testing "uniq -s -w (skip fields and compare max chars)" \ | ||
73 | "uniq -s 2 -w 2" \ | ||
74 | "aaccaa | ||
75 | " "" \ | ||
76 | "aaccaa | ||
77 | aaccbb | ||
78 | bbccaa | ||
79 | " | ||
63 | 80 | ||
64 | # -d is "Suppress the writing fo lines that are not repeated in the input." | 81 | # -d is "Suppress the writing fo lines that are not repeated in the input." |
65 | # -u is "Suppress the writing of lines that are repeated in the input." | 82 | # -u is "Suppress the writing of lines that are repeated in the input." |