diff options
Diffstat (limited to '')
-rwxr-xr-x | testsuite/busybox.tests | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/testsuite/busybox.tests b/testsuite/busybox.tests index beb17440c..2ce09b281 100755 --- a/testsuite/busybox.tests +++ b/testsuite/busybox.tests | |||
@@ -7,11 +7,22 @@ | |||
7 | . ./testing.sh | 7 | . ./testing.sh |
8 | test -f "$bindir/.config" && . "$bindir/.config" | 8 | test -f "$bindir/.config" && . "$bindir/.config" |
9 | 9 | ||
10 | ln -s `which busybox` unknown | 10 | if [ -f "$bindir/busybox.exe" ]; then |
11 | # Copy rather than link busybox.exe: we can only make hard | ||
12 | # links which can't be deleted because Windows sees the | ||
13 | # executable as running. | ||
14 | suffix=".exe" | ||
15 | lncmd="cp" | ||
16 | else | ||
17 | suffix="" | ||
18 | lncmd="ln -s" | ||
19 | fi | ||
20 | |||
21 | $lncmd "$(which busybox)" unknown$suffix | ||
11 | 22 | ||
12 | testing "busybox as unknown name" "./unknown 2>&1" \ | 23 | testing "busybox as unknown name" "./unknown 2>&1" \ |
13 | "unknown: applet not found\n" "" "" | 24 | "unknown: applet not found\n" "" "" |
14 | rm unknown | 25 | rm unknown$suffix |
15 | 26 | ||
16 | # We need busybox --help to be enabled for the rest of tests | 27 | # We need busybox --help to be enabled for the rest of tests |
17 | test x"$CONFIG_BUSYBOX" = x"y" \ | 28 | test x"$CONFIG_BUSYBOX" = x"y" \ |
@@ -23,7 +34,7 @@ optional FEATURE_VERBOSE_USAGE | |||
23 | testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n" "" "" | 34 | testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n" "" "" |
24 | SKIP= | 35 | SKIP= |
25 | 36 | ||
26 | ln -s `which busybox` busybox-suffix | 37 | $lncmd "$(which busybox)" busybox-suffix$suffix |
27 | for i in busybox ./busybox-suffix | 38 | for i in busybox ./busybox-suffix |
28 | do | 39 | do |
29 | testing "$i" "$i 2>&1 | cat" "$HELPDUMP\n" "" "" | 40 | testing "$i" "$i 2>&1 | cat" "$HELPDUMP\n" "" "" |
@@ -42,6 +53,6 @@ do | |||
42 | testing "$i --help unknown" "$i --help unknown 2>&1" \ | 53 | testing "$i --help unknown" "$i --help unknown 2>&1" \ |
43 | "unknown: applet not found\n" "" "" | 54 | "unknown: applet not found\n" "" "" |
44 | done | 55 | done |
45 | rm busybox-suffix | 56 | rm busybox-suffix$suffix |
46 | 57 | ||
47 | exit $FAILCOUNT | 58 | exit $FAILCOUNT |