4 |
# Copyright 2005 by Rob Landley <rob@landley.net> |
# Copyright 2005 by Rob Landley <rob@landley.net> |
5 |
# Licensed under GPL v2, see file LICENSE for details. |
# Licensed under GPL v2, see file LICENSE for details. |
6 |
|
|
7 |
. testing.sh |
. ./testing.sh |
8 |
|
|
9 |
HELPDUMP=`busybox` |
HELPDUMP=`true | busybox 2>&1 | cat` |
10 |
|
|
11 |
# We need to test under calling the binary under other names. |
# We need to test under calling the binary under other names. |
12 |
|
|
13 |
|
|
14 |
testing "busybox --help busybox" "busybox --help busybox" "$HELPDUMP\n\n" "" "" |
testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n\n" "" "" |
15 |
|
|
16 |
ln -s `which busybox` busybox-suffix |
ln -s `which busybox` busybox-suffix |
17 |
for i in busybox ./busybox-suffix |
for i in busybox ./busybox-suffix |
28 |
|
|
29 |
optional CAT |
optional CAT |
30 |
testing "" "$i cat" "moo" "" "moo" |
testing "" "$i cat" "moo" "" "moo" |
31 |
testing "$i --help cat" "$i --help cat 2>&1 | grep prints" \ |
testing "$i --help cat" "$i --help cat 2>&1 | grep print" \ |
32 |
"Concatenates FILE(s) and prints them to stdout.\n" "" "" |
"Concatenate FILEs and print them to stdout\n" "" "" |
33 |
optional "" |
optional "" |
34 |
|
|
35 |
testing "$i --help unknown" "$i --help unknown 2>&1" \ |
testing "$i --help unknown" "$i --help unknown 2>&1" \ |