Last change
on this file since 2745 was 2725, checked in by Bruno Cornec, 14 years ago |
- Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[821] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | # Tests for busybox applet itself.
|
---|
| 4 | # Copyright 2005 by Rob Landley <rob@landley.net>
|
---|
[2725] | 5 | # Licensed under GPLv2, see file LICENSE in this source tree.
|
---|
[821] | 6 |
|
---|
[2725] | 7 | . ./testing.sh
|
---|
[821] | 8 |
|
---|
[2725] | 9 | HELPDUMP=`true | busybox 2>&1 | cat`
|
---|
[821] | 10 |
|
---|
| 11 | # We need to test under calling the binary under other names.
|
---|
| 12 |
|
---|
[2725] | 13 | optional FEATURE_VERBOSE_USAGE
|
---|
| 14 | testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n\n" "" ""
|
---|
| 15 | SKIP=
|
---|
[821] | 16 |
|
---|
| 17 | ln -s `which busybox` busybox-suffix
|
---|
| 18 | for i in busybox ./busybox-suffix
|
---|
| 19 | do
|
---|
| 20 | # The gratuitous "\n"s are due to a shell idiosyncrasy:
|
---|
| 21 | # environment variables seem to strip trailing whitespace.
|
---|
| 22 |
|
---|
| 23 | testing "" "$i" "$HELPDUMP\n\n" "" ""
|
---|
| 24 |
|
---|
| 25 | testing "$i unknown" "$i unknown 2>&1" \
|
---|
| 26 | "unknown: applet not found\n" "" ""
|
---|
| 27 |
|
---|
| 28 | testing "$i --help" "$i --help 2>&1" "$HELPDUMP\n\n" "" ""
|
---|
| 29 |
|
---|
[2725] | 30 | optional FEATURE_VERBOSE_USAGE CAT
|
---|
[821] | 31 | testing "" "$i cat" "moo" "" "moo"
|
---|
[2725] | 32 | testing "$i --help cat" "$i --help cat 2>&1 | grep print" \
|
---|
| 33 | "Concatenate FILEs and print them to stdout\n" "" ""
|
---|
| 34 | SKIP=
|
---|
[821] | 35 |
|
---|
| 36 | testing "$i --help unknown" "$i --help unknown 2>&1" \
|
---|
| 37 | "unknown: applet not found\n" "" ""
|
---|
| 38 | done
|
---|
| 39 | rm busybox-suffix
|
---|
| 40 |
|
---|
| 41 | ln -s `which busybox` unknown
|
---|
| 42 |
|
---|
| 43 | testing "busybox as unknown name" "./unknown 2>&1" \
|
---|
| 44 | "unknown: applet not found\n" "" ""
|
---|
| 45 | rm unknown
|
---|
| 46 |
|
---|
| 47 | exit $FAILCOUNT
|
---|
Note:
See
TracBrowser
for help on using the repository browser.