mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-25 17:57:41 +00:00
feat(core): ldml normalization 🙀
- some failing marker tests For: #9468
This commit is contained in:
parent
eb705ba312
commit
efc8ef022f
2 changed files with 75 additions and 1 deletions
|
|
@ -133,4 +133,66 @@
|
|||
<check result="YES3" />
|
||||
</test>
|
||||
</tests>
|
||||
<tests name="regex-tests-4">
|
||||
<test name="regex-test-4a-0">
|
||||
<startContext to="" />
|
||||
<keystroke key="stampy" />
|
||||
<keystroke key="4" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="u-0300" />
|
||||
<backspace /> <!-- skip the number, match any -->
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
<test name="regex-test-4a-1">
|
||||
<startContext to="" />
|
||||
<keystroke key="4" />
|
||||
<keystroke key="stampy" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="u-0300" />
|
||||
<backspace /> <!-- skip the number, match any -->
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
<test name="regex-test-4a-2">
|
||||
<startContext to="" />
|
||||
<keystroke key="4" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="stampy" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="u-0300" />
|
||||
<backspace /> <!-- skip the number, match any -->
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
<test name="regex-test-4a-3">
|
||||
<startContext to="" />
|
||||
<keystroke key="4" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="stampy" />
|
||||
<keystroke key="u-0300" />
|
||||
<backspace /> <!-- skip the number, match any -->
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
<test name="regex-test-4a-4">
|
||||
<startContext to="" />
|
||||
<keystroke key="4" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="u-0300" />
|
||||
<keystroke key="stampy" />
|
||||
<backspace /> <!-- skip the number, match any -->
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
</tests>
|
||||
<tests name="regex-tests-5">
|
||||
<test name="regex-test-5a-0">
|
||||
<startContext to="" />
|
||||
<keystroke key="5" />
|
||||
<keystroke key="e" />
|
||||
<keystroke key="u-0320" />
|
||||
<keystroke key="u-0300" />
|
||||
<check result="YES4" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<key id="nfd" output="e\u{0320}\u{0300}" />
|
||||
<key id="nfc" output="\u{00E8}\u{0320}" />
|
||||
<key id="not-nfd" output="e\u{0300}\u{0320}" />
|
||||
<key id="stampy" output="\m{stampy}" />
|
||||
</keys>
|
||||
|
||||
<layers formId="us">
|
||||
|
|
@ -26,7 +27,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifiers="shift" id="shift">
|
||||
<row keys="u-0300 u-00e8 nfd nfc not-nfd" />
|
||||
<row keys="u-0300 u-00e8 nfd nfc not-nfd stampy" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
|
|
@ -43,6 +44,17 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="1e\u{0300}\u{0320}" to="YES1" /> <!-- out of order but should get normalized -->
|
||||
<transform from="2e\u{0320}\u{0300}" to="YES2" /> <!-- in order NFD -->
|
||||
<transform from="3\u{00E8}\u{0320}" to="YES3" /> <!-- in order NFC -->
|
||||
|
||||
<!-- matches with various markers-->
|
||||
<transform from="4\m{stampy}e\u{0300}\u{0320}" to="YES4a" />
|
||||
<transform from="4e\m{stampy}\u{0300}\u{0320}" to="YES4b" />
|
||||
<transform from="4e\u{0300}\m{stampy}\u{0320}" to="YES4c" />
|
||||
<transform from="4e\u{0300}\u{0320}\m{stampy}" to="YES4d" />
|
||||
|
||||
<transform from="5\m{stampy}e\u{0320}\u{0300}" to="YES5a" />
|
||||
<transform from="5e\m{stampy}\u{0320}\u{0300}" to="YES5b" />
|
||||
<transform from="5e\u{0320}\m{stampy}\u{0300}" to="YES5c" />
|
||||
<transform from="5e\u{0320}\u{0300}\m{stampy}" to="YES5d" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard3>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue