General cleanup of command line parsing to allow "busybox" to work as a prefix.
authorRob Landley <rob@landley.net>
Sun, 4 Sep 2005 11:10:37 +0000 (11:10 -0000)
committerRob Landley <rob@landley.net>
Sun, 4 Sep 2005 11:10:37 +0000 (11:10 -0000)
commitb766c394569cce356fceb63d83da79581c0997b9
treea1c4cd18cede88c2e18a6e22f0b59924d5838682
parent9754b91c16288fd0f4d6301fd6d01aa8b3c3b1d9
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...
applets/applets.c
applets/busybox.c
testsuite/busybox.tests [new file with mode: 0755]
testsuite/runtest
testsuite/testing.sh