blob: 44ebe1fc656c79df29c7e11cd4753fca8ebe7dd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* test_thstr.c : Test suite for <thai/thstr.h> functions
* Created: 2001-08-03
* Author: Theppitak Karoonboonyanan
*/
#include <thai/thstr.h>
#include <string.h>
int test_th_normalize()
{
const thchar_t* test_str = (const thchar_t *)"¤Øس»èÙ«èèÙ«èèÒ";
const thchar_t* ans_str = (const thchar_t *)"¤Ø³»Ùè«Ùè«èÒ";
thchar_t resBuff[50];
th_normalize(resBuff, test_str, sizeof resBuff);
return (strcmp((const char *)resBuff, (const char *)ans_str) == 0) ? 0 : 1;
}
int main()
{
return test_th_normalize();
}
|