aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
commit3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (patch)
tree6a217bf17e7c00e98a47f657015535f21b53cedd /coreutils/test.c
parent464c5de00d3dfb5f01e866f703d95bbb2bb9443c (diff)
downloadbusybox-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.gz
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 175cb5d05..bf1622cde 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -178,6 +178,15 @@ static int test_eaccess();
static int is_a_group_member();
static void initialize_group_array();
+const char test_usage[] =
+ "test EXPRESSION\n"
+ "or [ EXPRESSION ]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "\nChecks file types and compares values returning an exit\n"
+ "code determined by the value of EXPRESSION.\n"
+#endif
+ ;
+
extern int
test_main(int argc, char** argv)
{
@@ -188,15 +197,8 @@ test_main(int argc, char** argv)
fatalError("missing ]\n");
argv[argc] = NULL;
}
- if (strcmp(argv[1], dash_dash_help) == 0) {
- usage("test EXPRESSION\n"
- "or [ EXPRESSION ]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nChecks file types and compares values returning an exit\n"
- "code determined by the value of EXPRESSION.\n"
-#endif
- );
- }
+ if (strcmp(argv[1], dash_dash_help) == 0)
+ usage(test_usage);
/* Implement special cases from POSIX.2, section 4.62.4 */
switch (argc) {