aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/test.c b/test.c
index 175cb5d05..bf1622cde 100644
--- a/test.c
+++ b/test.c
@@ -178,6 +178,15 @@ static int test_eaccess();
178static int is_a_group_member(); 178static int is_a_group_member();
179static void initialize_group_array(); 179static void initialize_group_array();
180 180
181const char test_usage[] =
182 "test EXPRESSION\n"
183 "or [ EXPRESSION ]\n"
184#ifndef BB_FEATURE_TRIVIAL_HELP
185 "\nChecks file types and compares values returning an exit\n"
186 "code determined by the value of EXPRESSION.\n"
187#endif
188 ;
189
181extern int 190extern int
182test_main(int argc, char** argv) 191test_main(int argc, char** argv)
183{ 192{
@@ -188,15 +197,8 @@ test_main(int argc, char** argv)
188 fatalError("missing ]\n"); 197 fatalError("missing ]\n");
189 argv[argc] = NULL; 198 argv[argc] = NULL;
190 } 199 }
191 if (strcmp(argv[1], dash_dash_help) == 0) { 200 if (strcmp(argv[1], dash_dash_help) == 0)
192 usage("test EXPRESSION\n" 201 usage(test_usage);
193 "or [ EXPRESSION ]\n"
194#ifndef BB_FEATURE_TRIVIAL_HELP
195 "\nChecks file types and compares values returning an exit\n"
196 "code determined by the value of EXPRESSION.\n"
197#endif
198 );
199 }
200 202
201 /* Implement special cases from POSIX.2, section 4.62.4 */ 203 /* Implement special cases from POSIX.2, section 4.62.4 */
202 switch (argc) { 204 switch (argc) {