General cleanup of command line parsing to allow "busybox" to work as a prefix.
(I.E. any argv[0] that starts with "busybox" winds up in busybox_main().)
Added testing/busybox.tests which tests the following permutations:
./busybox
./busybox-suffix
./busybox cat
./busybox-suffix cat
./busybox --help
./busybox-suffix --help
./busybox --help cat
./busybox-suffix --help cat
./busybox --help unknown
./busybox-suffix --help unknown
./unknown
Also repair the test suite so ./runtest calls the ".tests" scripts properly.
Note: you can now go "busybox busybox busbox ls -l" and it'll take it. The
new code is pretty generic. I can block that if anybody can come up with a
good reason to...
diff --git a/testsuite/runtest b/testsuite/runtest
index 91b7943..6a0dc9d 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -97,8 +97,8 @@
status=1
fi
fi
-
- if [ -f "$applet".tests ]
+ applet=`echo "$applet" | sed -n 's/\.tests$//p'`
+ if [ ${#applet} != 0 ]
then
rm -f links/"$applet"
ln -s ../../busybox links/"$applet"