mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-22325 BRS 74rc move cldr testdata to consistent place, adjust test & tools to match
This commit is contained in:
parent
dff59b61f9
commit
e1af930c6a
8 changed files with 9 additions and 17 deletions
|
@ -270,17 +270,8 @@ cd $TOOLS_ROOT/cldr
|
|||
ant copy-cldr-testdata
|
||||
```
|
||||
|
||||
5d. Copy localeCanonicalization.txt from CLDR testData and add a source reference line:
|
||||
```
|
||||
cp -p $CLDR_DIR/common/testData/localeIdentifiers/localeCanonicalization.txt $ICU4C_DIR/source/test/testdata/
|
||||
cp -p $CLDR_DIR/common/testData/localeIdentifiers/localeCanonicalization.txt $ICU4J_ROOT/main/core/src/test/resources/com/ibm/icu/dev/data/unicode/
|
||||
open $ICU4C_DIR/source/test/testdata/localeCanonicalization.txt
|
||||
open $ICU4J_ROOT/main/core/src/test/resources/com/ibm/icu/dev/data/unicode/localeCanonicalization.txt
|
||||
```
|
||||
At the beginning of each file add the following line:\
|
||||
```
|
||||
# File copied from cldr common/testData/localeIdentifiers/localeCanonicalization.txt
|
||||
```
|
||||
5d. NOP
|
||||
(This step has been subsumed into 5c above)
|
||||
|
||||
5e. For now, manually re-add the `lstm` entries in `data/brkitr/root.txt`
|
||||
```
|
||||
|
|
|
@ -5527,7 +5527,7 @@ void LocaleTest::TestLocaleCanonicalizationFromFile()
|
|||
char testPath[400];
|
||||
char line[256];
|
||||
strcpy(testPath, sourceTestDataPath);
|
||||
strcat(testPath, "localeCanonicalization.txt");
|
||||
strcat(testPath, "cldr/localeIdentifiers/localeCanonicalization.txt");
|
||||
LocalStdioFilePointer testFile(fopen(testPath, "r"));
|
||||
if(testFile.isNull()) {
|
||||
errln("unable to open %s", testPath);
|
||||
|
@ -5707,7 +5707,7 @@ LocaleTest::TestDataDrivenLikelySubtags() {
|
|||
return;
|
||||
}
|
||||
IcuTestErrorCode errorCode(*this, "TestDataDrivenLikelySubtags()");
|
||||
const char* name = "likelySubtags.txt";
|
||||
const char* name = "cldr/localeIdentifiers/likelySubtags.txt";
|
||||
const char *sourceTestDataPath = getSourceTestData(errorCode);
|
||||
if (errorCode.errIfFailureAndReset("unable to find the source/test/testdata "
|
||||
"folder (getSourceTestData())")) {
|
||||
|
|
|
@ -5396,7 +5396,7 @@ public class ULocaleTest extends TestFmwk {
|
|||
|
||||
@Test
|
||||
public void TestLocaleCanonicalizationFromFile() throws IOException {
|
||||
BufferedReader testFile = TestUtil.getDataReader("unicode/localeCanonicalization.txt");
|
||||
BufferedReader testFile = TestUtil.getDataReader("cldr/localeIdentifiers/localeCanonicalization.txt");
|
||||
try {
|
||||
String line;
|
||||
while ((line = testFile.readLine()) != null) {
|
||||
|
@ -5460,7 +5460,7 @@ public class ULocaleTest extends TestFmwk {
|
|||
static List<TestCase> readLikelySubtagsTestCases() throws Exception {
|
||||
List<TestCase> tests = new ArrayList<>();
|
||||
TestCase test = new TestCase();
|
||||
BufferedReader testFile = TestUtil.getDataReader("likelySubtags.txt");
|
||||
BufferedReader testFile = TestUtil.getDataReader("cldr/localeIdentifiers/likelySubtags.txt");
|
||||
try {
|
||||
String line;
|
||||
while ((line = testFile.readLine()) != null) {
|
||||
|
|
|
@ -40,9 +40,10 @@
|
|||
<!-- CLDR test data directories to be copied into ICU. -->
|
||||
<fileset id="cldrTestData" dir="${cldrDir}/common/testData">
|
||||
<!-- Add directories here to control which test data is installed. -->
|
||||
<include name="units/**"/> <!-- Used in UnitsTest tests -->
|
||||
<include name="localeIdentifiers/**"/> <!-- ... -->
|
||||
<include name="personNameTest/**"/> <!-- Used in ExhaustivePersonNameTest -->
|
||||
</fileset>
|
||||
<include name="units/**"/> <!-- Used in UnitsTest tests -->
|
||||
</fileset>
|
||||
|
||||
<copy todir="${testDataDir4C}">
|
||||
<fileset refid="cldrTestData"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue