mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 09:25:33 +00:00
chore(core): failing test with markers 🙀
- marker overrun! the 40th marker becomes a parenthesis, breaking regex feat(core): ldml proper regex implementation 🙀🙀 #9121
This commit is contained in:
parent
561cecb0de
commit
763f7abeb0
3 changed files with 48 additions and 0 deletions
12
core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml
Normal file
12
core/tests/unit/ldml/keyboards/k_211_marker_escape-test.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_211_marker_escape.xml" author="Team Keyboard" name="marker" />
|
||||
<tests name="marker-escape">
|
||||
<test name="marker-escape0">
|
||||
<keystroke key="z" />
|
||||
<keystroke key="e" />
|
||||
<check result="E" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest3>
|
||||
35
core/tests/unit/ldml/keyboards/k_211_marker_escape.xml
Normal file
35
core/tests/unit/ldml/keyboards/k_211_marker_escape.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Test Keyboard
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Marker Escape Test"/>
|
||||
|
||||
<displays>
|
||||
</displays>
|
||||
|
||||
<keys>
|
||||
<!-- fourty markers. so that the next one would have its representation as '(' -->
|
||||
<key id="1" output="\m{m01}\m{m02}\m{m03}\m{m04}\m{m05}\m{m06}\m{m07}\m{m08}\m{m09}\m{m10}\m{m11}\m{m12}\m{m13}\m{m14}\m{m15}\m{m16}\m{m17}\m{m18}\m{m19}\m{m20}\m{m21}\m{m22}\m{m23}\m{m24}\m{m25}\m{m26}\m{m27}\m{m28}\m{m29}\m{m30}\m{m31}\m{m32}\m{m33}\m{m34}\m{m35}\m{m36}\m{m37}\m{m38}\m{m39}\m{m40}"/>
|
||||
<!-- this marker should output as U+FFFF U+0008 U+0029 which will break regex -->
|
||||
<key id="z" output="\m{z}" />
|
||||
</keys>
|
||||
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="B 1 2 3" />
|
||||
<row keys="q w e" /> <!-- etc -->
|
||||
<row keys="a s d" /> <!-- etc -->
|
||||
<row keys="z x c" /> <!-- etc -->
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<transform from="\m{z}e" to="E" /> <!-- will end up as '…(e' an unclosed group -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard3>
|
||||
|
|
@ -41,6 +41,7 @@ tests_with_testdata = [
|
|||
'k_200_reorder_nod_Lana',
|
||||
'k_201_reorder_esk',
|
||||
'k_210_marker',
|
||||
'k_211_marker_escape',
|
||||
]
|
||||
|
||||
tests = tests_without_testdata
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue