Skip to content

Commit

Permalink
CLDR-17089 kbd: mixed children test/data fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Oct 3, 2023
1 parent fff63e0 commit 462530f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
29 changes: 13 additions & 16 deletions keyboards/3.0/fr-t-k0-azerty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,24 @@

<!-- test key -->
<key id="a" flicks="a" to="a" longPress="à â á ä ã å ā" />
<flicks>
<flick id="a">
<flickSegment directions="nw" to="\u{1234}" />
<flickSegment directions="nw se" to="\u{FFFF}" />
<flickSegment directions="e" to="\u{FFF0}" />
</flick>
</flicks>

<!-- test key -->
<key id="A" flicks="b" to="A" longPress="À Á Ä Ã Å Ā" />

<!-- test flick -->
<flicks id="b">
<flick directions="nw" to="\u{4567}" />
<flick directions="nw se" to="\u{FFFF}" />
<flick directions="e" to="\u{FFF0}" />
</flicks>

<!-- TODO: all additional maps, hardware and touch -->
</keys>

<flicks>
<flick id="a">
<flickSegment directions="nw" to="\u{1234}" />
<flickSegment directions="nw se" to="\u{FFFF}" />
<flickSegment directions="e" to="\u{FFF0}" />
</flick>
<flick id="b">
<flickSegment directions="nw" to="\u{4567}" />
<flickSegment directions="nw se" to="\u{FFFF}" />
<flickSegment directions="e" to="\u{FFF0}" />
</flick>
</flicks>

<layers form="iso">
<!-- in DTD: required if conformsTo ≥ 41 -->
<layer modifier="none">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package org.unicode.cldr.unittest;

import com.google.common.base.Joiner;
import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap;
import com.ibm.icu.dev.test.TestFmwk;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -17,6 +13,7 @@
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;

import org.unicode.cldr.util.CLDRConfig;
import org.unicode.cldr.util.CLDRPaths;
import org.unicode.cldr.util.DtdData;
Expand All @@ -34,6 +31,11 @@
import org.unicode.cldr.util.XMLFileReader;
import org.unicode.cldr.util.XPathParts;

import com.google.common.base.Joiner;
import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap;
import com.ibm.icu.dev.test.TestFmwk;

public class TestDtdData extends TestFmwk {
private static final String COMMON_DIR = CLDRPaths.BASE_DIRECTORY + "common/";
static CLDRConfig testInfo = CLDRConfig.getInstance();
Expand Down Expand Up @@ -787,13 +789,12 @@ public boolean isDistinguishingOld(DtdType dtdType, String elementName, String a
|| elementName.equals("backspace") && attribute.equals("from")
|| elementName.equals("backspace") && attribute.equals("after")
|| elementName.equals("vkeys") && attribute.equals("type")
|| elementName.equals("flick") && attribute.equals("directions")
|| elementName.equals("flickSegment") && attribute.equals("directions")
// || elementName.equals("row") && attribute.equals("keys")
|| elementName.equals("vkey") && attribute.equals("iso")
|| elementName.equals("display") && attribute.equals("to")
|| elementName.equals("display") && attribute.equals("id")
|| elementName.equals("flicks") && attribute.equals("id")
|| elementName.equals("flick") && attribute.equals("directions");
|| elementName.equals("flick") && attribute.equals("id");
case keyboardTest3:
return elementName.equals("tests") && attribute.equals("name")
|| elementName.equals("test") && attribute.equals("name")
Expand Down

0 comments on commit 462530f

Please sign in to comment.