diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/CldrVersion.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/CldrVersion.java index c3e34f44449..afa895fd2a8 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/CldrVersion.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/CldrVersion.java @@ -131,6 +131,11 @@ public boolean isOlderThan(CldrVersion other) { return compareTo(other) < 0; } + public boolean isAsOldOrOlderThan(CldrVersion other) { + return compareTo(other) <= 0; + } + + private CldrVersion() { String oldName = name(); if (oldName.charAt(0) == 'v') { diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/util/ElementAttributeInfo.java b/tools/cldr-code/src/main/java/org/unicode/cldr/util/ElementAttributeInfo.java index 019eb80cde9..836027a746a 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/util/ElementAttributeInfo.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/util/ElementAttributeInfo.java @@ -103,7 +103,7 @@ private static Map makeElementAttributeInfoMap( addElementAttributeInfo( result, DtdType.keyboard3, - canonicalCommonDirectory + "/../keyboards/3.0/fr-t-k0-test.xml"); + canonicalCommonDirectory + "/../tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/und-t-k0-none.xml"); addElementAttributeInfo( result, DtdType.keyboardTest3, diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/und-t-k0-none.xml b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/und-t-k0-none.xml new file mode 100644 index 00000000000..23905643cfc --- /dev/null +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/und-t-k0-none.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBasic.java b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBasic.java index c21c6c5689c..1fb1d234909 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBasic.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBasic.java @@ -192,10 +192,6 @@ private void checkDtds( continue; } else if (fileName.isDirectory()) { checkDtds(fileName, level + 1, foundAttributes, data); - } else if (fileName.getPath().contains("/keyboards/3.0/") - && logKnownIssue( - "CLDR-17574", "With v46, parsing issues for keyboard xml files")) { - ; // do nothing, skip test } else if (name.endsWith(".xml")) { data.add(check(fileName)); if (deepCheck // takes too long to do all the time @@ -1252,6 +1248,10 @@ public void TestBasicDTDCompatibility() { continue; // DTD didn't exist in last release } if (dtd == DtdType.ldmlICU) continue; + if (dtd == DtdType.keyboard3 && CldrVersion.LAST_RELEASE_VERSION.isAsOldOrOlderThan(CldrVersion.v45_0)) { + // Sample file did not have a DTD in v45, moved to a new location in v46+ + continue; + } try { ElementAttributeInfo oldDtd = ElementAttributeInfo.getInstance(oldCommon, dtd); ElementAttributeInfo newDtd = ElementAttributeInfo.getInstance(dtd); @@ -1566,11 +1566,6 @@ public void TestDtdComparisonsAll() { && file.getParentFile().getParentFile().getName().equals("keyboards")) { return; // skip imports } - if (file.getPath().contains("/keyboards/3.0/") - && logKnownIssue( - "CLDR-17574", "With v46, parsing issues for keyboard xml files")) { - continue; - } checkDtdComparatorFor(file, null); } } diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestPaths.java b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestPaths.java index ddf60ed9ce0..cb3e2fce7b9 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestPaths.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestPaths.java @@ -472,12 +472,6 @@ public void TestNonLdml() { ) { continue; } - if (dir2.getPath().contains("/keyboards/3.0") - && logKnownIssue( - "CLDR-17574", "With v46, parsing issues for keyboard xml files")) { - continue; - } - Set> seen = new HashSet<>(); Set seenStarred = new HashSet<>(); int count = 0; diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/util/TestDoctypeXmlStreamWrapper.java b/tools/cldr-code/src/test/java/org/unicode/cldr/util/TestDoctypeXmlStreamWrapper.java index d8f7baa9456..a534136a1f9 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/util/TestDoctypeXmlStreamWrapper.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/util/TestDoctypeXmlStreamWrapper.java @@ -54,9 +54,6 @@ void TestReadCommon() throws FileNotFoundException, IOException { @Test void TestReadKeyboard() throws FileNotFoundException, IOException { - if (true /* TODO CLDR-17574 With v46, parsing issues for keyboard xml files */) { - return; - } for (int i = 0; i < COUNT; i++) { new XMLFileReader() .setHandler(new XMLFileReader.SimpleHandler()) @@ -67,9 +64,6 @@ void TestReadKeyboard() throws FileNotFoundException, IOException { @Test void TestReadKeyboardByte() throws IOException, SAXException { // verify that reading via InputStream (byte) works as well - if (true /* TODO CLDR-17574 With v46, parsing issues for keyboard xml files */) { - return; - } try (InputStream fis = new FileInputStream(KEYBOARDS_MT); ) { InputSource is = new InputSource(fis); is.setSystemId(KEYBOARDS_MT); @@ -81,9 +75,6 @@ void TestReadKeyboardByte() throws IOException, SAXException { @Test void TestReadKeyboardChar() throws IOException, SAXException { // verify that reading via Reader (char) works as well - if (true /* TODO CLDR-17574 With v46, parsing issues for keyboard xml files */) { - return; - } try (InputStream fis = new FileInputStream(KEYBOARDS_MT); InputStreamReader isr = new InputStreamReader(fis); ) { InputSource is = new InputSource(isr);