Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / liblouis / src / tests / pass2_inpos.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <stdlib.h>
4 #include "brl_checks.h"
5
6 int
7 main(int argc, char **argv)
8 {
9
10   const char* table = "pass2.ctb";
11
12   int result = 0;
13
14   /* First check a plain word to see if inpos handling generally
15      works */
16   const char* str1 = "Rene";
17   const int expected_inpos1[] = {0,1,2,3,3};
18
19   result |= check_inpos(table, str1, expected_inpos1);
20
21   /* then try a word which uses pass2 and makes the output longer */
22   const char* str2 = "Reno";
23   const int expected_inpos2[] = {0,1,2,3,3};
24
25   result |= check_inpos(table, str2, expected_inpos2);
26
27   /* finally try a word also uses pass2, deletes a char from the
28      output and essentially shortens the output */
29   const char* str3 = "xRen";
30   const int expected_inpos3[] = {1,2,3};
31
32   result |= check_inpos(table, str3, expected_inpos3);
33
34   return result;
35
36 }