From f5405f919113d24bc6b56962919d6b7b779f23c8 Mon Sep 17 00:00:00 2001 From: Alan Liu Date: Mon, 22 Sep 2003 18:48:31 +0000 Subject: [PATCH] ICU-3266 add -tz [zone] option to cintltst, and make default time zone be America/Los_Angeles (unless otherwise specified on command line) X-SVN-Rev: 13162 --- icu4c/source/test/cintltst/cintltst.c | 60 +++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c index ced2a26326..1733d68e80 100644 --- a/icu4c/source/test/cintltst/cintltst.c +++ b/icu4c/source/test/cintltst/cintltst.c @@ -29,6 +29,7 @@ #include "unicode/ucnv.h" #include "unicode/ures.h" #include "unicode/uclean.h" +#include "unicode/ucal.h" #include "uoptions.h" #ifdef XP_MAC_CONSOLE @@ -112,9 +113,11 @@ int main(int argc, const char* const argv[]) { int nerrors = 0; int warnOnMissingData = 0; - int i; + int i, j; TestNode *root; const char *warnOrErr = "Failure"; + const char *zone = "America/Los_Angeles"; + const char** argv2; /* initial check for the default converter */ UErrorCode errorCode = U_ZERO_ERROR; @@ -123,13 +126,22 @@ int main(int argc, const char* const argv[]) U_MAIN_INIT_ARGS(argc, argv); + argv2 = (const char**) ctst_malloc(sizeof(char*) * argc); + if (argv2 == NULL) { + printf("*** Error: Out of memory (too many cmd line args?)\n"); + return 1; + } + argv2[0] = argv[0]; + + /* Checkargs */ /* TODO: Test framework arg handling needs to be decoupled from test execution * so that the args being processed here don't need special handling, * separate from the other test args. */ ICU_TRACE = UTRACE_OFF; - for(i=1;i 0) { printf("Repeating tests %d more time(s)\n", REPEAT_TESTS);