mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-22 07:37:40 +00:00
test(common/lmlayer): fix expecations for Turkic orthography
This commit is contained in:
parent
f8bfba5e85
commit
87f35da404
1 changed files with 8 additions and 3 deletions
|
|
@ -6,10 +6,15 @@ import { defaultSearchTermToKey } from '../dist/lexical-model-compiler/build-tri
|
|||
|
||||
describe('The default searchTermToKey() function', function () {
|
||||
it('should lowercase and THEN normalize', function() {
|
||||
// "İstanbul" has a DOTTED-I. This should be lowercased,
|
||||
// then have its dot removed!
|
||||
// "İstanbul" has a U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE.
|
||||
// This should be lowercased.
|
||||
assert.equal(defaultSearchTermToKey('İstanbul'), 'istanbul');
|
||||
assert.equal(defaultSearchTermToKey('Diyarbakır'), 'diyarbakır');
|
||||
// The DEFAULT function is NOT responsible for understanding the Turkish
|
||||
// case regarding the lowercasing of:
|
||||
// 'I' U+0048 LATIN CAPITAL LETTER I to 'ı' U+0131 LATIN SMALL LETTER DOTLESS I
|
||||
// For Turkic languages, the recommendation is to make a
|
||||
// custom searchTermToKey function:
|
||||
assert.equal(defaultSearchTermToKey('DİYARBAKIR'), 'diyarbakir');
|
||||
|
||||
// "skýlos" is Greek for dog 🇬🇷🐶
|
||||
// starts with an 's' and ends with an 's'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue