fix: correct Katakana composition
This commit is contained in:
@@ -481,6 +481,41 @@ engine_japanese_backspace_and_boundaries(struct ct *t)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
engine_katakana_sequences(struct ct *t)
|
||||
{
|
||||
static const struct {
|
||||
char *keys;
|
||||
char *want;
|
||||
} cases[] = {
|
||||
{ "kitte", "キッテ" },
|
||||
{ "katta", "カッタ" },
|
||||
{ "gakkou", "ガッコウ" },
|
||||
{ "matcha", "マッチャ" },
|
||||
{ "xu", "ゥ" },
|
||||
{ "vu", "ヴ" },
|
||||
};
|
||||
Dictreq req;
|
||||
Str com, shown;
|
||||
int i;
|
||||
|
||||
newestrequest(&req);
|
||||
for(i = 0; i < nelem(cases); i++){
|
||||
init();
|
||||
im.l = getlang(LangJPK);
|
||||
sclear(&com);
|
||||
if(!typekeys(t, cases[i].keys, &com))
|
||||
continue;
|
||||
checkstr(t, cases[i].keys, "", &com);
|
||||
shown = shownpre(&im);
|
||||
checkstr(t, cases[i].keys, cases[i].want, &shown);
|
||||
CT_CHECK(t, keystroke(Kret, 0, &com));
|
||||
checkstr(t, "committed Katakana", cases[i].want, &com);
|
||||
}
|
||||
CT_EQ_INT(t, 0, newestrequest(&req));
|
||||
CT_EQ_PTR(t, nil, getlang(LangJPK)->dictname);
|
||||
}
|
||||
|
||||
void
|
||||
engine_emoji_single_candidate(struct ct *t)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user