aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-07 04:18:36 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-07 04:18:36 +0000
commit86a128c54e2c214ac1b645d8fc678e2137b14913 (patch)
tree1d3cc979d1d5f829176be54ffc7d4674db64b7e6 /testsuite
parent0bb5da2111a0783f50d2067b16a18d56f61b346a (diff)
downloadbusybox-w32-86a128c54e2c214ac1b645d8fc678e2137b14913.tar.gz
busybox-w32-86a128c54e2c214ac1b645d8fc678e2137b14913.tar.bz2
busybox-w32-86a128c54e2c214ac1b645d8fc678e2137b14913.zip
Don't comment warnings. Don't put #warnings about warnings. _FIX_ warnings.
This fixes the warning, and makes the binary smaller out of sheer pique. (Yes, since Manuel did this one it's nice tight code that took several attempts to shrink, but I was ticked.) Add the start of a test for uniq; this is about the first 1/3 of the tests we need for full susv3 coverage of uniq. git-svn-id: svn://busybox.net/trunk/busybox@11347 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/uniq.tests36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/uniq.tests b/testsuite/uniq.tests
new file mode 100755
index 000000000..dc37d0a32
--- /dev/null
+++ b/testsuite/uniq.tests
@@ -0,0 +1,36 @@
1#!/bin/sh
2
3# SUSv3 compliant uniq tests.
4# Copyright 2005 by Rob Landley <rob@landley.net>
5# Licensed under GPL v2, see file LICENSE for details.
6
7# AUDIT: Not full coverage of the spec yet.
8
9if [ ${#COMMAND} -eq 0 ]; then COMMAND=uniq; fi
10. testing.sh
11
12# The basic tests. These should work even with the small busybox.
13#-f skip fields
14#-s skip chars
15#-c occurrences
16#-d dups only
17#-u
18testing "uniq (default to stdin)" "" "one\ntwo\nthree\n" "" \
19 "one\ntwo\ntwo\nthree\nthree\nthree\n"
20testing "uniq - (specify stdin)" "-" "one\ntwo\nthree\n" "" \
21 "one\ntwo\ntwo\nthree\nthree\nthree\n"
22testing "uniq input (specify file)" "input" "one\ntwo\nthree\n" \
23 "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
24testing "uniq input outfile (two files)" "input actual > /dev/null" \
25 "one\ntwo\nthree\n" "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
26#testing "uniq - outfile" "- outfile" "one\ntwo\nthree\n" \
27# "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
28
29testing "uniq -d" "-d" "two\nthree\n" "" \
30 "one\ntwo\ntwo\nthree\nthree\nthree\n"
31testing "uniq -c" "-c" " 1 one\n 2 two\n 3 three\n" "" \
32 "one\ntwo\ntwo\nthree\nthree\nthree\n"
33# testing "uniq -c -d"
34# testing "uniq infile"
35
36exit $FAILCOUNT