File: letterDefTest.c

package info (click to toggle)
liblouis 3.0.0-3%2Bdeb9u4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 68,336 kB
  • sloc: ansic: 26,525; sh: 5,113; makefile: 739; perl: 69; python: 42
file content (33 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* liblouis Braille Translation and Back-Translation Library

Copyright (C) 2012 Swiss Library for the Blind, Visually Impaired and Print Disabled
Copyright (C) 2012 Mesar Hameed <mesar.hameed@gmail.com>

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty. */

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "liblouis.h"
#include "brl_checks.h"

int main(int argc, char **argv)
{

  int result = 0;

  const char *text = "\\x280d\\x280e";  // "⠍⠎"
  const char *expected = "sm";  // "⠎⠍"

  result |= check_translation("letterDefTest_letter.ctb", text, NULL, expected);
  result |= check_translation("letterDefTest_lowercase.ctb", text, NULL, expected);
  //result |= check_translation("letterDefTest_uplow.ctb", text, NULL, expected);
  result |= check_translation("letterDefTest_uppercase.ctb", text, NULL, expected);

  lou_free();

  return result;
}