6 |
|
|
7 |
# AUDIT: Full SUSv3 coverage (except internationalization). |
# AUDIT: Full SUSv3 coverage (except internationalization). |
8 |
|
|
9 |
. testing.sh |
. ./testing.sh |
10 |
|
|
11 |
# testing "test name" "options" "expected result" "file input" "stdin" |
# testing "test name" "options" "expected result" "file input" "stdin" |
12 |
# file input will be file called "input" |
# file input will be file called "input" |
50 |
testing "uniq -c (occurrence count)" "uniq -c | sed 's/^[ \t]*//'" \ |
testing "uniq -c (occurrence count)" "uniq -c | sed 's/^[ \t]*//'" \ |
51 |
"1 one\n2 two\n3 three\n" "" \ |
"1 one\n2 two\n3 three\n" "" \ |
52 |
"one\ntwo\ntwo\nthree\nthree\nthree\n" |
"one\ntwo\ntwo\nthree\nthree\nthree\n" |
53 |
testing "uniq -d (dups only) " "uniq -d" "two\nthree\n" "" \ |
testing "uniq -d (dups only)" "uniq -d" "two\nthree\n" "" \ |
54 |
"one\ntwo\ntwo\nthree\nthree\nthree\n" |
"one\ntwo\ntwo\nthree\nthree\nthree\n" |
55 |
|
|
56 |
testing "uniq -f -s (skip fields and chars)" "uniq -f2 -s 3" \ |
testing "uniq -f -s (skip fields and chars)" "uniq -f2 -s 3" \ |