mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-82 Added test for unicode version (u_getVersion()), test will break if version changes w/o test change.
X-SVN-Rev: 167
This commit is contained in:
parent
275d27501b
commit
ba0efec3b7
1 changed files with 13 additions and 1 deletions
|
@ -317,9 +317,21 @@ void TestUnicodeData()
|
|||
char* bufferPtr = 0, *dirPtr = 0;
|
||||
int32_t unicode;
|
||||
char newPath[256];
|
||||
const char *expectVersion = "3.0.0"; /* NOTE: this purposely breaks to force the tests to stay in sync with the unicodedata */
|
||||
char expectString[256];
|
||||
|
||||
strcpy(newPath,icu_getDefaultDataDirectory());
|
||||
strcat(newPath, "UnicodeData-3.0.0.txt");
|
||||
strcat(newPath, "UnicodeData-");
|
||||
strcat(newPath, expectVersion);
|
||||
strcat(newPath, ".txt");
|
||||
|
||||
strcpy(expectString, "Unicode Version ");
|
||||
strcat(expectString, expectVersion);
|
||||
|
||||
if(strcmp(u_getVersion(), expectString) != 0)
|
||||
{
|
||||
log_err("Testing u_getVersion() - expected %s got %s\n", expectString, u_getVersion());
|
||||
}
|
||||
|
||||
input = fopen(newPath, "r");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue