ICU-5231 More robust reading of UCA test file for threading test
X-SVN-Rev: 19728
This commit is contained in:
parent
ad73d4ec89
commit
29d93b9c92
@ -1321,7 +1321,7 @@ void MultithreadTest::TestCollators()
|
||||
|
||||
while (fgets(buffer, 1024, testFile) != NULL) {
|
||||
offset = 0;
|
||||
if(*buffer == 0 || buffer[0] == '#') {
|
||||
if(*buffer == 0 || strlen(buffer) < 3 || buffer[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
offset = u_parseString(buffer, bufferU, 1024, &first, &status);
|
||||
@ -1333,8 +1333,10 @@ void MultithreadTest::TestCollators()
|
||||
lineNum++;
|
||||
}
|
||||
fclose(testFile);
|
||||
|
||||
|
||||
if(U_FAILURE(status)) {
|
||||
errln("Couldn't read the test file!");
|
||||
return;
|
||||
}
|
||||
|
||||
UCollator *coll = ucol_open("root", &status);
|
||||
if(U_FAILURE(status)) {
|
||||
|
Loading…
Reference in New Issue
Block a user