Skip to content

Commit

Permalink
chore(core): create sample LDML keyboard that exercises effectively a…
Browse files Browse the repository at this point in the history
…ll functionality

- add some more functionality

For #10505
  • Loading branch information
srl295 committed Feb 14, 2024
1 parent 65ae101 commit 3bd95e8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
12 changes: 12 additions & 0 deletions core/tests/unit/ldml/keyboards/und-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@
<keystroke key="1" />
<check result="1:basic:OK" />
</test>
<test name="key-2">
<keystroke key="2" />
<check result="2:simple_transform:OK" />
</test>
<test name="key-3">
<keystroke key="3" />
<check result="3:simple_marker:OK" />
</test>
<test name="key-4">
<keystroke key="4" />
<check result="4:simple_reorder:OK" />
</test>
</tests>
</keyboardTest3>
33 changes: 32 additions & 1 deletion core/tests/unit/ldml/keyboards/und.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,43 @@
<info layout="qwerty" name="Test Keyboards"/>

<keys>
<key id="1" output="1:basic:OK"/>
<key id="1" output="1:basic:OK" />
<key id="2" output="2:simple_transform:FAIL" />
<key id="3" output="3:simple_marker:FAIL\m{marker}" />
<key id="4" output="4:simple_reorder:UNTIED" />
</keys>

<layers formId="us">
<layer modifiers="none" id="base">
<row keys="gap 1 2 3 4 5 6 7 8 9 0" />
</layer>
</layers>

<transforms type="simple">
<transformGroup>
<!--
from to char
- - -
1 1 U
2 2 N
3 4 T
4 3 I
5 5 E
6 6 D
-->
<reorder from="U" order="0" />
<reorder from="N" order="1" />
<reorder from="I" order="3" /> <!-- the 'T' and 'I' will swap places-->
<reorder from="T" order="2" />
<reorder from="E" order="4" />
<reorder from="D" order="5" />
</transformGroup>
<transformGroup>
<transform from="simple_transform:FAIL" to="simple_transform:OK" />
<transform from="FAIL\m{marker}" to="OK" />
<transform from="UNITED" to="OK" />
<transform from="UNTIED" to="FAIL" />
</transformGroup>
</transforms>

</keyboard3>

0 comments on commit 3bd95e8

Please sign in to comment.