Davy Kager | 99255bd | 2015-10-14 12:56:16 +0200 | [diff] [blame] | 1 | /* liblouis Braille Translation and Back-Translation Library |
| 2 | |
| 3 | Copyright (C) 2012 James Teh <jamie@nvaccess.org> |
| 4 | Copyright (C) 2015 Davy Kager <mail@davykager.nl> |
| 5 | |
| 6 | Copying and distribution of this file, with or without modification, |
| 7 | are permitted in any medium without royalty provided the copyright |
| 8 | notice and this notice are preserved. This file is offered as-is, |
| 9 | without any warranty. */ |
| 10 | |
| 11 | #include <stdio.h> |
| 12 | #include <string.h> |
| 13 | #include <stdlib.h> |
| 14 | #include "liblouis.h" |
| 15 | |
| 16 | int |
| 17 | main(int argc, char **argv) |
| 18 | { |
Christian Egli | 9553960 | 2016-10-06 17:26:42 +0200 | [diff] [blame] | 19 | const char *goodTable = "tables/en-us-g1.ctb"; |
| 20 | const char *badTable = "tests/tables/bad.ctb"; |
Davy Kager | 99255bd | 2015-10-14 12:56:16 +0200 | [diff] [blame] | 21 | 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 | } |