mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-1075 Change tests to try to run if ICU_DATA is not set in environment
X-SVN-Rev: 5397
This commit is contained in:
parent
1aaf688f97
commit
63e908b597
1 changed files with 2 additions and 4 deletions
|
@ -230,12 +230,11 @@ void ctest_setICU_DATA() {
|
|||
#if defined (U_SRCDATADIR)
|
||||
{
|
||||
static const char env_string = "ICU_DATA=" U_SRCDATADIR;
|
||||
_putenv(env_string);
|
||||
putenv(env_string);
|
||||
return
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
/* On Windows, the file name obtained from __FILE__ includes a full path.
|
||||
* This file is "wherever\icu\source\test\cintltst\cintltst.c"
|
||||
* Change to "wherever\icu\source\data"
|
||||
|
@ -262,11 +261,10 @@ void ctest_setICU_DATA() {
|
|||
* Now append "source\data" and set the environment
|
||||
*/
|
||||
strcpy(pBackSlash, "\\data");
|
||||
_putenv(p); /* p is "ICU_DATA=wherever\icu\source\data" */
|
||||
putenv(p); /* p is "ICU_DATA=wherever\icu\source\data" */
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* No location for the data dir was identifiable.
|
||||
* Add other fallbacks for the test data location here if the need arises
|
||||
|
|
Loading…
Add table
Reference in a new issue