Esempio n. 1
0
int main()
{
	putenv( "CHEWING_PATH=" CHEWING_DATA_PREFIX );
	putenv( "CHEWING_USER_PATH=" TEST_HASH_DIR );

	test_select_candidate();
	test_Esc();
	test_Del();
	test_Backspace();
	test_Up();
	test_Down();
	test_Tab();
	test_DblTab();
	test_Capslock();
	test_Home();
	test_End();
	test_PageUp();
	test_PageDown();
	test_ShiftSpace();
	test_Numlock();

	test_get_phoneSeq();
	test_zuin_buffer();

	return exit_status();
}
Esempio n. 2
0
int main(int argc, char *argv[])
{
    char *logname;
    int ret;

    putenv("CHEWING_PATH=" CHEWING_DATA_PREFIX);
    putenv("CHEWING_USER_PATH=" TEST_HASH_DIR);

    ret = asprintf(&logname, "%s.log", argv[0]);
    if (ret == -1)
        return -1;
    fd = fopen(logname, "w");
    assert(fd);
    free(logname);


    test_select_candidate();
    test_Esc();
    test_Del();
    test_Backspace();
    test_Up();
    test_Down();
    test_Tab();
    test_DblTab();
    test_Capslock();
    test_Home();
    test_End();
    test_PageUp();
    test_PageDown();
    test_ShiftSpace();
    test_Numlock();
    test_Space();

    test_get_phoneSeq();
    test_bopomofo_buffer();

    test_longest_phrase();
    test_auto_commit();

    test_interval();

    test_jk_selection();

    test_KB();

    fclose(fd);

    return exit_status();
}