mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-3266 add checks for UCONFIG_NO_FORMATTING
X-SVN-Rev: 13252
This commit is contained in:
parent
e73dc2f4f3
commit
16d44ffb76
2 changed files with 13 additions and 1 deletions
|
@ -95,7 +95,9 @@ int main(int argc, const char* const argv[])
|
|||
int i, j;
|
||||
TestNode *root;
|
||||
const char *warnOrErr = "Failure";
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
const char *zone = "America/Los_Angeles";
|
||||
#endif
|
||||
const char** argv2;
|
||||
|
||||
/* initial check for the default converter */
|
||||
|
@ -137,6 +139,7 @@ int main(int argc, const char* const argv[])
|
|||
else if (strcmp( argv[i], "-t_verbose") == 0) {
|
||||
ICU_TRACE = UTRACE_VERBOSE;
|
||||
}
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
else if (strcmp( argv[i], "-tz") == 0) {
|
||||
zone = 0;
|
||||
if ((i+1) < argc) {
|
||||
|
@ -159,6 +162,7 @@ int main(int argc, const char* const argv[])
|
|||
* common nor i18n, by design. */
|
||||
--j;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
argc = j;
|
||||
|
||||
|
@ -246,6 +250,7 @@ int main(int argc, const char* const argv[])
|
|||
|
||||
fprintf(stdout, "Default locale for this run is %s\n", uloc_getDefault());
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
/* Set the default time zone */
|
||||
if (zone != 0) {
|
||||
UErrorCode ec = U_ZERO_ERROR;
|
||||
|
@ -262,6 +267,7 @@ int main(int argc, const char* const argv[])
|
|||
}
|
||||
fprintf(stdout, "Default time zone for this run is %s\n",
|
||||
(zone!=0) ? zone : "UNSET");
|
||||
#endif
|
||||
|
||||
/* Build a tree of all tests.
|
||||
* Subsequently will be used to find / iterate the tests to run */
|
||||
|
|
|
@ -635,7 +635,11 @@ int processArgs(const TestNode* root,
|
|||
static void help ( const char *argv0 )
|
||||
{
|
||||
printf("Usage: %s [ -l ] [ -v ] [ -verbose] [-a] [ -all] [-n] [ -no_err_msg]\n"
|
||||
" [ -h ] [-t_info | -t_error | -t_warn | -t_verbose] [-tz [zone]] [ /path/to/test ]\n",
|
||||
" [ -h ] [-t_info | -t_error | -t_warn | -t_verbose]"
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
" [-tz [zone]]"
|
||||
#endif
|
||||
" [ /path/to/test ]\n",
|
||||
argv0);
|
||||
printf(" -l To get a list of test names\n");
|
||||
printf(" -e to do exhaustive testing\n");
|
||||
|
@ -648,9 +652,11 @@ static void help ( const char *argv0 )
|
|||
printf(" -t_info | -t_error | -t_warn | -t_verbose Enable ICU tracing\n");
|
||||
printf(" -no_err_msg (same as -n) \n");
|
||||
printf(" -r repeat tests after calling u_cleanup \n");
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
/* NOTE: the -tz [zone] option is parsed by cintltst. I know, ugly. */
|
||||
printf(" -tz [zone] To set default time zone. If no zone is given\n"
|
||||
" then don't set default time zone (use host zone).\n");
|
||||
#endif
|
||||
printf(" -[/subtest] To run a subtest \n");
|
||||
printf(" eg: to run just the utility tests type: cintltest /tsutil) \n");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue