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:
@@ -3,22 +3,10 @@
|
||||
static Str
|
||||
kotrans(char *keys)
|
||||
{
|
||||
Emit e;
|
||||
Im state;
|
||||
Str out;
|
||||
char *p;
|
||||
Str out, raw;
|
||||
|
||||
memset(&state, 0, sizeof state);
|
||||
state.l = getlang(LangKO);
|
||||
sclear(&out);
|
||||
for(p = keys; *p != '\0'; p++){
|
||||
e = transko(&state, (uchar)*p);
|
||||
sappend(&out, &e.s);
|
||||
state.pre = e.next;
|
||||
if(!e.eat)
|
||||
sputr(&out, (uchar)*p);
|
||||
}
|
||||
sappend(&out, &state.pre);
|
||||
raw = mkstr(keys);
|
||||
transstr(getlang(LangKO), &raw, &out);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user