Skip to content

Commit

Permalink
chore(core): add some more marker tests 🙀
Browse files Browse the repository at this point in the history
For #9468
  • Loading branch information
srl295 committed Dec 21, 2023
1 parent 0b3e7a9 commit 12aa9a5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
32 changes: 32 additions & 0 deletions core/tests/unit/ldml/keyboards/k_008_transform_norm-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,36 @@
</test>
<!-- TODO: all the variations -->
</tests>
<tests name="regex-tests-8">
<test name="regex-test-8a-0">
<!-- simple test, exactly as written-->
<keystroke key="8" />
<keystroke key="e" />
<keystroke key="stampy"/>
<keystroke key="u-0300"/>
<keystroke key="lgtm"/>
<keystroke key="u-0320"/>
<check result="YES8a"/>
</test>
<test name="regex-test-8b-0">
<!-- simple test, exactly as written-->
<keystroke key="8" />
<keystroke key="e" />
<keystroke key="u-0300"/>
<keystroke key="stampy"/>
<keystroke key="lgtm"/>
<keystroke key="u-0320"/>
<check result="YES8b"/>
</test>
<test name="regex-test-8c-0">
<!-- simple test, exactly as written-->
<keystroke key="8" />
<keystroke key="e" />
<keystroke key="u-0300"/>
<keystroke key="u-0320"/>
<keystroke key="stampy"/>
<keystroke key="lgtm"/>
<check result="YES8d"/> <!-- TODO-LDML: not FAIL?-->
</test>
</tests>
</keyboardTest3>
8 changes: 7 additions & 1 deletion core/tests/unit/ldml/keyboards/k_008_transform_norm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
<key id="nfc" output="\u{00E8}\u{0320}" />
<key id="not-nfd" output="e\u{0300}\u{0320}" />
<key id="stampy" output="\m{stampy}" />
<key id="lgtm" output="\m{lgtm}" />
</keys>

<layers formId="us">
Expand All @@ -27,7 +28,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 stampy" />
<row keys="u-0300 u-00e8 nfd nfc not-nfd stampy lgtm" />
</layer>
</layers>

Expand Down Expand Up @@ -67,6 +68,11 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
<transform from="7\m{stampy}e\u{0300}" to="YES7a" />
<transform from="7e\m{stampy}\u{0300}" to="YES7b" />
<transform from="7e\u{0300}\m{stampy}" to="YES7c" />

<transform from="8e\m{stampy}\u{0300}\m{lgtm}\u{0320}" to="YES8a" />
<transform from="8e\u{0300}\m{stampy}\m{lgtm}\u{0320}" to="YES8b" />
<transform from="8e\u{0300}\u{0320}\m{stampy}\m{lgtm}" to="FAIL" /> <!-- denormalized, does not match -->
<transform from="8e\u{0320}\u{0300}\m{stampy}\m{lgtm}" to="YES8d" /> <!-- NFD -->
</transformGroup>
</transforms>
</keyboard3>

0 comments on commit 12aa9a5

Please sign in to comment.