test: drive Korean and Vietnamese through the engine's own transstr
ko_test and vi_test replayed keys with private copies of transstr's loop, and test_util reimplemented the shown preedit; the engine exports impre(Im*, Str*) and transstr() instead, so a change to composition rules is one edit.
This commit is contained in:
@@ -20,23 +20,3 @@ checkstr(struct ct *t, char *where, char *want, Str *got)
|
||||
return CT_ERRORF(t, "%s: want \"%s\", got \"%s\"",
|
||||
where, want, buf);
|
||||
}
|
||||
|
||||
Str
|
||||
shownpre(Im *state)
|
||||
{
|
||||
Str mapped, shown;
|
||||
|
||||
if(state->l->lang == LangJP || state->l->lang == LangJPK){
|
||||
shown = state->pre;
|
||||
if(state->raw.n == 0)
|
||||
return shown;
|
||||
if(mapget(state->l->map, &state->raw, &mapped))
|
||||
sappend(&shown, &mapped);
|
||||
else
|
||||
sappend(&shown, &state->raw);
|
||||
return shown;
|
||||
}
|
||||
if(state->l->map != nil && mapget(state->l->map, &state->pre, &shown))
|
||||
return shown;
|
||||
return state->pre;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user