Пример #1
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();
}
Пример #2
0
 void func()
 {
     test_splitn();
     test_interval();
     test_combine();
     test_extract();
     test_split();
     test_trim();
     test_urldecode();
     test_querystring();
     test_str_pat_match();
     test_munge();
     test_counter_filename();
     test_stripext();
     test_explode();
     test_sql_quote();
     test_js_quote();
     test_iso_8601_datetime();
     test_is_valid_settings_name();
 }