Skip to content

Commit

Permalink
fix: Fix and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
New9c committed Mar 6, 2025
1 parent 2a03c50 commit 7d5a308
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test-bopomofo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,22 @@ void test_KB_DVORAK_HSU()
chewing_delete(ctx);
}

void test_KB_COLEMAK()
{
ChewingContext *ctx;

ctx = chewing_new();
start_testcase(ctx, fd);

chewing_set_KBType(ctx, KB_COLEMAK);
type_keystroke_by_string(ctx, "vl; sn4l; 5; 2e7c;31o4");
ok_preedit_buffer(ctx, "\xE6\x96\xB0\xE9\x85\xB7\xE9\x9F\xB3\xE7\x9C\x9F\xE7\x9A\x84\xE5\xBE\x88\xE6\xA3\x92"
/* 新酷音真的很棒 */ );
chewing_clean_preedit_buf(ctx);

chewing_delete(ctx);
}

void test_KB_COLEMAK_DH_ANSI()
{
ChewingContext *ctx;
Expand Down
1 change: 1 addition & 0 deletions tests/test-keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static const char *const KEYBOARD_STRING[] = {
"KB_THL_PINYIN",
"KB_MPS2_PINYIN",
"KB_CARPALX",
"KB_COLEMAK",
"KB_COLEMAK_DH_ANSI",
"KB_COLEMAK_DH_ORTH",
"KB_WORKMAN"
Expand Down

0 comments on commit 7d5a308

Please sign in to comment.