diff options
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index cb15ed725..2e896f4c7 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -39,6 +39,29 @@ | |||
39 | //config: help | 39 | //config: help |
40 | //config: Enable 64-bit support in test. | 40 | //config: Enable 64-bit support in test. |
41 | 41 | ||
42 | /* "test --help" does not print help (POSIX compat), only "[ --help" does. | ||
43 | * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") | ||
44 | * Unfortunately, it screws up generated BusyBox.html. TODO. */ | ||
45 | //usage:#define test_trivial_usage | ||
46 | //usage: "EXPRESSION ]" | ||
47 | //usage:#define test_full_usage "\n\n" | ||
48 | //usage: "Check file types, compare values etc. Return a 0/1 exit code\n" | ||
49 | //usage: "depending on logical value of EXPRESSION" | ||
50 | //usage: | ||
51 | //usage:#define test_example_usage | ||
52 | //usage: "$ test 1 -eq 2\n" | ||
53 | //usage: "$ echo $?\n" | ||
54 | //usage: "1\n" | ||
55 | //usage: "$ test 1 -eq 1\n" | ||
56 | //usage: "$ echo $?\n" | ||
57 | //usage: "0\n" | ||
58 | //usage: "$ [ -d /etc ]\n" | ||
59 | //usage: "$ echo $?\n" | ||
60 | //usage: "0\n" | ||
61 | //usage: "$ [ -d /junk ]\n" | ||
62 | //usage: "$ echo $?\n" | ||
63 | //usage: "1\n" | ||
64 | |||
42 | #include "libbb.h" | 65 | #include "libbb.h" |
43 | #include <setjmp.h> | 66 | #include <setjmp.h> |
44 | 67 | ||