-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(common,developer): tests and warning on denormalized content
- common: shift the 'strs' processing slightly, because otherwise we normalize to NFD before even tracking the strings - if any string is neither NFC nor NFD, give a warning - add tests for the same Fixes: #7394
- Loading branch information
Showing
8 changed files
with
132 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
developer/src/kmc-ldml/test/fixtures/sections/strs/warn-denorm-1.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45"> | ||
<version number="1.0.0" /> | ||
|
||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd" /> | ||
|
||
<keys> | ||
<key id="ess" output="s\u{0307}\u{0323}" /> <!-- not NFD--> | ||
</keys> | ||
|
||
<layers formId="us" minDeviceWidth="123"> | ||
<layer id="zz"> | ||
<row keys="ess" /> | ||
</layer> | ||
</layers> | ||
|
||
</keyboard3> |
22 changes: 22 additions & 0 deletions
22
developer/src/kmc-ldml/test/fixtures/sections/strs/warn-denorm-2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45"> | ||
<version number="1.0.0" /> | ||
|
||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd" /> | ||
|
||
<keys> | ||
<key id="ess" output="${ess}" /> | ||
</keys> | ||
|
||
<variables> | ||
<string id="ess" value="s\u{0307}\u{0323}" /> <!-- Not NFD --> | ||
</variables> | ||
|
||
<layers formId="us" minDeviceWidth="123"> | ||
<layer id="zz"> | ||
<row keys="ess" /> | ||
</layer> | ||
</layers> | ||
|
||
</keyboard3> |
26 changes: 26 additions & 0 deletions
26
developer/src/kmc-ldml/test/fixtures/sections/strs/warn-denorm-3.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45"> | ||
<version number="1.0.0" /> | ||
|
||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd" /> | ||
|
||
<displays> | ||
<display keyId="ess" display="s\u{0307}\u{0323}" /> <!-- not NFD--> | ||
</displays> | ||
|
||
<keys> | ||
<key id="ess" output="${ess}" /> | ||
</keys> | ||
|
||
<variables> | ||
<string id="ess" value="S" /> | ||
</variables> | ||
|
||
<layers formId="us" minDeviceWidth="123"> | ||
<layer id="zz"> | ||
<row keys="ess" /> | ||
</layer> | ||
</layers> | ||
|
||
</keyboard3> |
26 changes: 26 additions & 0 deletions
26
developer/src/kmc-ldml/test/fixtures/sections/strs/warn-denorm-4.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="mt" conformsTo="45"> | ||
<version number="1.0.0" /> | ||
|
||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd" /> | ||
|
||
|
||
<keys> | ||
<key id="ess" output="S" /> | ||
</keys> | ||
|
||
|
||
<layers formId="us" minDeviceWidth="123"> | ||
<layer id="zz"> | ||
<row keys="ess" /> | ||
</layer> | ||
</layers> | ||
|
||
<transforms type="simple"> | ||
<transformGroup> | ||
<transform from="S" to="s\u{0307}\u{0323}" /> <!-- Not NFD--> | ||
</transformGroup> | ||
</transforms> | ||
|
||
</keyboard3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters