Skip to content

Commit

Permalink
chore(core): ldml update out of techpreview 🙀
Browse files Browse the repository at this point in the history
- updates to support techpreview -> 45
- test changes

Fixes: #10900
  • Loading branch information
srl295 committed Mar 3, 2024
1 parent 0ada31b commit 17a653f
Show file tree
Hide file tree
Showing 36 changed files with 50 additions and 65 deletions.
1 change: 1 addition & 0 deletions core/include/ldml/keyman_core_ldml.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define LDML_CLDR_IMPLIED_FORMS_IMPORT "45/scanCodes-implied.xml"
#define LDML_CLDR_IMPLIED_KEYS_IMPORT "45/keys-Latn-implied.xml"
#define LDML_CLDR_IMPORT_BASE "cldr"
#define LDML_CLDR_TEST_VERSION_LATEST "techpreview"
#define LDML_CLDR_VERSION_LATEST "45"
#define LDML_ELEM_FLAGS_ORDER_BITSHIFT 0x10
#define LDML_ELEM_FLAGS_ORDER_MASK 0xFF0000
Expand Down
4 changes: 4 additions & 0 deletions core/include/ldml/keyman_core_ldml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ class Constants {
* The current CLDR version
*/
readonly cldr_version_latest = '45';
/**
* The version for testdata files
*/
readonly cldr_test_version_latest = 'techpreview';
/**
* import base
*/
Expand Down
2 changes: 1 addition & 1 deletion core/src/ldml/C7532_ldml_updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ working on ‘layr’, using ‘disp’ as a model from https://github.com/keyma

## XML changes

- `resources/standards-data/ldml-keyboards/techpreview/` : update / reimport / fix fixup script if needed
- `resources/standards-data/ldml-keyboards/45/` : update / reimport / fix fixup script if needed
- E/C: `common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts`
- add to `LKKeyboard` and subproperties as needed to support the structure on the XML side
- Now would be a good time to stop and make sure everything compiles. It didn’t, there was an unrelated issue with snprintf!
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/k_001_tiny-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_001_tiny.xml" author="srl295" name="k_001_tiny" />
<!-- <repertoire chars="[ħ ថា]" type="simple" name="our-little-language" /> TODO-LDML: not working yet -->
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_001_tiny.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
@@expected: \u0127\u1790\u17B6\u0127
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="mt" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>

<keys>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_002_tinyu32.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
@@expected: \u0127\u1790\u17B6\u0127\uD83D\uDE40\u0127
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="mt" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd-UTF32"/>

<keys>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_003_transform.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
@@expected: qu\u00ea
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TransformKbd"/>

<keys>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_004_tinyshift.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
@@expected: \u0037\u1790\u17B6\u0127
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="mt" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>

<keys>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_005_modbittest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
@@expected: \u0061\u0041\u0062\u0063\u0064\u0064\u0065\u0066\u0067\u0067
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="mt" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>

<keys/> <!-- implied only -->
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/k_006_backspace-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_006_backspace.xml" author="Team Keyboard" name="backspace" />
<tests name="backspace">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_006_backspace.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TransformKbd"/>

<keys>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_007_transform_rgx.xml" author="Team Keyboard" name="marker" />
<tests name="regex-tests">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="k_007_transform_rgx" />

<keys>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_008_transform_norm.xml" author="Team Keyboard" name="transform-norm" />
<tests name="regex-test-dot0">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_008_transform_norm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ from
https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="k_008_transform_norm" />

<keys>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_009_transform_nfc.xml" author="Team Keyboard" name="transform-norm" />
<tests name="regex-test-dot0">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_009_transform_nfc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<!--
like k_008 but in NFC (and other normalizations)
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="k_009_transform_nfc" />

<settings normalization="disabled" />
Expand Down
8 changes: 3 additions & 5 deletions core/tests/unit/ldml/keyboards/k_010_mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Gets part of the way,
Based on mt.xml from CLDR. 'TODO-LDML' denotes modifications.
Note this is the 47-key version.
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<!-- remainder entirely from resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml -->
<keyboard3 locale="mt-t-k0-47key" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt-t-k0-47key" conformsTo="45">
<locales>
<!-- English is also an official language in Malta.-->
<locale id="en" />
Expand All @@ -21,8 +19,8 @@ Gets part of the way,

<keys>
<!-- imports -->
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
<import base="cldr" path="45/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="45/keys-Zyyy-currency.xml" />

<!-- accent grave -->
<key id="a-grave" output="à" />
Expand Down
7 changes: 3 additions & 4 deletions core/tests/unit/ldml/keyboards/k_011_mt_iso.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Exact copy of mt.xml from CLDR, but with:
- an updated DTD path
- test case
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="mt" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45">
<locales>
<!-- English is also an official language in Malta.-->
<locale id="en" />
Expand All @@ -21,8 +20,8 @@ Exact copy of mt.xml from CLDR, but with:

<keys>
<!-- imports -->
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml"/>
<import base="cldr" path="45/keys-Zyyy-punctuation.xml"/>
<import base="cldr" path="45/keys-Zyyy-currency.xml"/>

<!-- accent grave -->
<key id="a-grave" output="à" />
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/k_020_fr-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_020_fr.xml" author="Team Keyboard" name="fr-test-updated" />
<repertoire name="simple-repertoire" chars="[a b c d e \u0022]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
Expand Down
7 changes: 3 additions & 4 deletions core/tests/unit/ldml/keyboards/k_020_fr.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="fr-t-k0-azerty" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="fr-t-k0-azerty" conformsTo="45">
<locales>
<locale id="br" /> <!-- example of including Breton -->
</locales>
Expand All @@ -28,8 +27,8 @@
</displays>

<keys>
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
<import base="cldr" path="45/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="45/keys-Zyyy-currency.xml" />

<!-- switch keys -->
<key id="shift" layerId="shift" />
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_100_keytest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
@@expected: \u0061
-->

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>

<keys>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_101_keytest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
@@keys: [K_BKQUOTE]
@@expected: \u0061
-->
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>

<displays>
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_102_keytest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
q<enter>az Az enter=not mappable, should cause context reset of qaz. TODO-LDML no invalidate here?
-->

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
<!-- TODO-LDML: split to separate test with only implied keys - the <keys/> element is omitted. -->
<keys>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_200_reorder_nod_Lana.xml" author="Team Keyboard" name="nod-Lana" />
<tests name="reorder-tests">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
see https://keyman.com/keyboards/sil_boonkit
-->

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="nod" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="nod" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="nod-Lana Test"/>

<keys>
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/k_201_reorder_esk-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_201_reorder_esk.xml" author="Team Keyboard" name="esk-reorder-test" />
<tests name="basic">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_201_reorder_esk.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en-t-k0-esk" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en-t-k0-esk" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="esk reorder test"/>

<displays>
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/k_210_marker-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_210_marker.xml" author="Team Keyboard" name="marker" />
<tests name="marker-tests">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_210_marker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
Test Keyboard
-->

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="Marker Test"/>

<displays>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="k_211_marker_escape.xml" author="Team Keyboard" name="marker" />
<tests name="marker-escape">
Expand Down
3 changes: 1 addition & 2 deletions core/tests/unit/ldml/keyboards/k_211_marker_escape.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
Test Keyboard
-->

<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="en" conformsTo="45">
<info author="srl295" indicator="🙀" layout="qwerty" name="Marker Escape Test"/>

<displays>
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/keyboards/ldml_test-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/45/dt/ldmlKeyboardTest3.dtd">
<keyboardTest3 conformsTo="techpreview">
<info keyboard="ldml_test.xml" author="srl295" name="test" />

Expand Down
6 changes: 3 additions & 3 deletions core/tests/unit/ldml/keyboards/ldml_test.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<keyboard3 locale="en" conformsTo="techpreview">
<keyboard3 locale="en" conformsTo="45">
<info author="Steven R. Loomis" name="LDML Test"/>
<version number="1.0.0"/>
<keys>
<!-- keep the base items -->
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml"/>
<import base="cldr" path="45/keys-Zyyy-punctuation.xml"/>
<import base="cldr" path="45/keys-Zyyy-currency.xml"/>
<!-- redefine the number keys -->
<key id="1" output="1:basic:OK" />
<key id="2" output="2:simple_transform:FAIL" />
Expand Down
8 changes: 4 additions & 4 deletions core/tests/unit/ldml/keyboards/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#


# keyboards in resources/standards-data/ldml-keyboards/techpreview/3.0/
# tests in resources/standards-data/ldml-keyboards/techpreview/test/
# keyboards in resources/standards-data/ldml-keyboards/45/3.0/
# tests in resources/standards-data/ldml-keyboards/45/test/
tests_from_cldr = [
'ja-Latn',
'pt-t-k0-abnt2',
# 'fr-t-k0-optimise', (not yet)
# 'fr-t-k0-test',
'fr-t-k0-azerty',
'pcm',
'bn',
]
Expand Down Expand Up @@ -55,7 +55,7 @@ tests += tests_from_cldr
# Setup kmc

kmc_root = join_paths(meson.source_root(),'..','developer','src','kmc')
ldml_root = join_paths(meson.source_root(),'..','resources','standards-data','ldml-keyboards','techpreview')
ldml_root = join_paths(meson.source_root(),'..','resources','standards-data','ldml-keyboards','45')
ldml_data = join_paths(ldml_root, '3.0')
ldml_testdata = join_paths(ldml_root, 'test')
kmc_cmd = [node, '--enable-source-maps', kmc_root]
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/ldml/ldml_test_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ int LdmlJsonTestSourceFactory::load(const km::core::path &compiled, const km::co
}

auto conformsTo = data["/keyboardTest3/conformsTo"_json_pointer].get<std::string>();
assert_or_return(std::string(LDML_CLDR_VERSION_LATEST) == conformsTo);
assert_or_return(std::string(LDML_CLDR_TEST_VERSION_LATEST) == conformsTo);
auto info_keyboard = data["/keyboardTest3/info/keyboard"_json_pointer].get<std::string>();
auto info_author = data["/keyboardTest3/info/author"_json_pointer].get<std::string>();
auto info_name = data["/keyboardTest3/info/name"_json_pointer].get<std::string>();
Expand Down

0 comments on commit 17a653f

Please sign in to comment.