예제 #1
0
int
main(int argc, char **argv)
{

    const char* table = "tests/tables/pass2.ctb";

    int result = 0;

    /* First check a plain word to see if inpos handling generally
       works */
    const char* str1 = "Rene";
    const int expected_inpos1[] = {0,1,2,3,3};

    result |= check_inpos(table, str1, expected_inpos1);

    /* then try a word which uses pass2 and makes the output longer */
    const char* str2 = "Reno";
    const int expected_inpos2[] = {0,1,2,3,3};

    result |= check_inpos(table, str2, expected_inpos2);

    /* finally try a word also uses pass2, deletes a char from the
       output and essentially shortens the output */
    const char* str3 = "xRen";
    const int expected_inpos3[] = {1,2,3};

    result |= check_inpos(table, str3, expected_inpos3);

    lou_free();

    return result;

}
예제 #2
0
int
main (int argc, char **argv)
{
    const char *str1 = "*****@*****.**";
    const int expected_inpos[] =
    {0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,15,15};

    int result = check_inpos(TRANSLATION_TABLE, str1, expected_inpos);

    lou_free();

    return result;
}
예제 #3
0
int
main(int argc, char **argv)
{

  int result = 0;

  const char* txt = "Fussball-Vereinigung";

  const char* table = "inpos_match_replace.ctb";

  const char* brl = "FUSSBALL-V7EINIGUNG";

  const int inpos[] = {0,1,2,3,4,5,6,7,8,9,9,12,13,14,15,16,17,18,19};

  result |= check_translation(table, txt, NULL, brl);
  result |= check_inpos(table, txt, inpos);

  return result;

}