aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 2d245be6c..1f5398ad8 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -39,6 +39,29 @@
//config: help
//config: Enable 64-bit support in test.
+/* "test --help" does not print help (POSIX compat), only "[ --help" does.
+ * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION")
+ * Unfortunately, it screws up generated BusyBox.html. TODO. */
+//usage:#define test_trivial_usage
+//usage: "EXPRESSION ]"
+//usage:#define test_full_usage "\n\n"
+//usage: "Check file types, compare values etc. Return a 0/1 exit code\n"
+//usage: "depending on logical value of EXPRESSION"
+//usage:
+//usage:#define test_example_usage
+//usage: "$ test 1 -eq 2\n"
+//usage: "$ echo $?\n"
+//usage: "1\n"
+//usage: "$ test 1 -eq 1\n"
+//usage: "$ echo $?\n"
+//usage: "0\n"
+//usage: "$ [ -d /etc ]\n"
+//usage: "$ echo $?\n"
+//usage: "0\n"
+//usage: "$ [ -d /junk ]\n"
+//usage: "$ echo $?\n"
+//usage: "1\n"
+
#include "libbb.h"
#include <setjmp.h>