Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/testsuite/busybox.tests

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (show annotations) (download)
Sun May 30 11:32:42 2010 UTC (13 years, 11 months ago) by niro
File size: 1190 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 #!/bin/sh
2
3 # Tests for busybox applet itself.
4 # Copyright 2005 by Rob Landley <rob@landley.net>
5 # Licensed under GPL v2, see file LICENSE for details.
6
7 . ./testing.sh
8
9 HELPDUMP=`true | busybox 2>&1 | cat`
10
11 # We need to test under calling the binary under other names.
12
13
14 testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n\n" "" ""
15
16 ln -s `which busybox` busybox-suffix
17 for i in busybox ./busybox-suffix
18 do
19 # The gratuitous "\n"s are due to a shell idiosyncrasy:
20 # environment variables seem to strip trailing whitespace.
21
22 testing "" "$i" "$HELPDUMP\n\n" "" ""
23
24 testing "$i unknown" "$i unknown 2>&1" \
25 "unknown: applet not found\n" "" ""
26
27 testing "$i --help" "$i --help 2>&1" "$HELPDUMP\n\n" "" ""
28
29 optional CAT
30 testing "" "$i cat" "moo" "" "moo"
31 testing "$i --help cat" "$i --help cat 2>&1 | grep print" \
32 "Concatenate FILEs and print them to stdout\n" "" ""
33 optional ""
34
35 testing "$i --help unknown" "$i --help unknown 2>&1" \
36 "unknown: applet not found\n" "" ""
37 done
38 rm busybox-suffix
39
40 ln -s `which busybox` unknown
41
42 testing "busybox as unknown name" "./unknown 2>&1" \
43 "unknown: applet not found\n" "" ""
44 rm unknown
45
46 exit $FAILCOUNT

Properties

Name Value
svn:executable *