Debian Codegraph @

tests/hyphenate_xxx.c

raw symbols SCIP
1 /* liblouis Braille Translation and Back-Translation Library
2
3 Copyright (C) 2013 Mesar Hameed <[email protected]>
4
5 Copying and distribution of this file, with or without modification,
6 are permitted in any medium without royalty provided the copyright
7 notice and this notice are preserved. This file is offered as-is,
8 without any warranty. */
9
10 #include <config.h>
11
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <assert.h>
15 #include "liblouis.h"
16 #include "brl_checks.h"
17
18 /* The same bug can be reproduced with only 3 'x'es. */
19 int main(int argc, char **argv)
20 {
21 int ret = 0;
22 char *tables = "tables/cs-g1.ctb,tables/hyph_cs_CZ.dic";
23 char *word = "xxx";
24 char * hyphens = calloc(5, sizeof(char));
25
26 hyphens[0] = '0';
27 hyphens[1] = '0';
28 hyphens[2] = '0';
29
30 ret = check_hyphenation_pos(tables, word, hyphens);
31 assert(hyphens[3] == '\0');
32 assert(hyphens[4] == '\0');
33 free(hyphens);
34 lou_free();
35 return ret;
36 }