Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / liblouis / src / tests / hash_collision.c
1 #include <stdio.h>
2 #include "brl_checks.h"
3 #include "liblouis.h"
4
5 int
6 main (int argc, char **argv)
7 {
8   int result = 0;
9   char *table = "empty.ctb";
10   char rule[18];
11
12   lou_compileString(table, "include latinLetterDef6Dots.uti");
13
14   for (char c1 = 'a'; c1 <= 'z'; c1++) {
15     for (char c2 = 'a'; c2 <= 'z'; c2++) {
16       for (char c3 = 'a'; c3 <= 'z'; c3++) {
17         sprintf(rule, "always aa%c%c%c 1", c1, c2, c3);
18         lou_compileString(table, rule);
19       }
20     }
21   }
22
23   result |= check_translation(table, "aaaaa", NULL, "a");
24   /* Strangely enough subsequent translations fail */
25   result |= check_translation(table, "aaaaa", NULL, "a");
26   result |= check_translation(table, "aazzz", NULL, "a");
27
28   return result;
29 }