Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / liblouis / src / tests / hyphenate_xxx.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <assert.h>
4 #include "brl_checks.h"
5
6 /* Illustrates the same bug as doctests/hyphenate_xxx_test.txt
7  * The same bug can be reproduced with only 3 'x'es. */
8 int main(int argc, char **argv)
9 {
10   int ret = 0;
11   char *tables = "cs-g1.ctb,hyph_cs_CZ.dic";
12   char *word = "xxx";
13   char * hyphens = calloc(5, sizeof(char));
14
15   hyphens[0] = '0';
16   hyphens[1] = '0';
17   hyphens[2] = '0';
18
19   ret = check_hyphenation(tables, word, hyphens);
20   assert(hyphens[3] == '\0');
21   assert(hyphens[4] == '\0');
22   free(hyphens);
23   return ret;
24 }