blob: abd59cd6aeec28706c2775a09d8a5bf02209b4c9 [file] [log] [blame]
Davy Kager99255bd2015-10-14 12:56:16 +02001/* liblouis Braille Translation and Back-Translation Library
2
3Copyright (C) 2012 James Teh <jamie@nvaccess.org>
4Copyright (C) 2015 Davy Kager <mail@davykager.nl>
5
6Copying and distribution of this file, with or without modification,
7are permitted in any medium without royalty provided the copyright
8notice and this notice are preserved. This file is offered as-is,
9without any warranty. */
10
11#include <stdio.h>
12#include <string.h>
13#include <stdlib.h>
14#include "liblouis.h"
15
16int
17main(int argc, char **argv)
18{
Christian Egli95539602016-10-06 17:26:42 +020019 const char *goodTable = "tables/en-us-g1.ctb";
20 const char *badTable = "tests/tables/bad.ctb";
Davy Kager99255bd2015-10-14 12:56:16 +020021 int result = 0;
22
23 if (lou_checkTable(goodTable) == 0)
24 {
25 printf("Getting %s failed, expected success\n", goodTable);
26 result = 1;
27 }
28
29 if (lou_checkTable(badTable) != 0)
30 {
31 printf("Getting %s succeeded, expected failure\n", badTable);
32 result = 1;
33 }
34
35 if (lou_checkTable(goodTable) == 0)
36 {
37 printf("Getting %s failed, expected success\n", goodTable);
38 result = 1;
39 }
40
41 lou_free();
42
43 return result;
44}