Skip to content

Commit

Permalink
Fix 趕人 in tsi.src
Browse files Browse the repository at this point in the history
  • Loading branch information
czchen committed Dec 6, 2012
1 parent 2a7ad3e commit 50101fe
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ test/test-path
test/test-path.exe
test/test-reset
test/test-reset.exe
test/test-regression
test/test-regression.exe
test/test-symbol
test/test-symbol.exe
test/test-special-symbol
Expand Down
2 changes: 1 addition & 1 deletion data/tsi.src
Original file line number Diff line number Diff line change
Expand Up @@ -127518,7 +127518,7 @@
趕不到 2 ㄍㄢˇ ㄅㄨˊ ㄉㄠˋ
趕不及 8 ㄍㄢˇ ㄅㄨˋ ㄐㄧˊ
趕了 29 ㄍㄢˇ ㄌㄜ˙
趕人 265 ㄍㄢˇ ㄗㄡˇ
趕人 265 ㄍㄢˇ ㄖㄣˊ
趕任務 0 ㄍㄢˇ ㄖㄣˋ ㄨˋ
趕來 117 ㄍㄢˇ ㄌㄞˊ
趕來趕去 5 ㄍㄢˇ ㄌㄞˊ ㄍㄢˇ ㄑㄩˋ
Expand Down
1 change: 1 addition & 0 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ NATIVE_TESTS = \
test-mmap \
test-path \
test-reset \
test-regression \
test-symbol \
test-special-symbol \
test-utf8 \
Expand Down
53 changes: 53 additions & 0 deletions test/test-regression.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* test-regression.c
*
* Copyright (c) 2012
* libchewing Core Team. See ChangeLog for details.
*
* See the file "COPYING" for information on usage and redistribution
* of this file.
*/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>

#include "chewing.h"
#include "plat_types.h"
#include "hash-private.h"
#include "test.h"


void test_libchewing_data_issue_1()
{
const TestData DATA = {
.token = "e03y.3",
.expected = "趕走",
};
ChewingContext *ctx;

remove( TEST_HASH_DIR PLAT_SEPARATOR HASH_FILE );

chewing_Init( NULL, NULL );

ctx = chewing_new();
chewing_set_maxChiSymbolLen( ctx, 16 );
type_keystoke_by_string( ctx, DATA.token );
ok_preedit_buffer( ctx, DATA.expected );

chewing_delete( ctx );
chewing_Terminate();
}

int main()
{
putenv( "CHEWING_PATH=" CHEWING_DATA_PREFIX );
putenv( "CHEWING_USER_PATH=" TEST_HASH_DIR );

test_libchewing_data_issue_1();

return exit_status();
}

0 comments on commit 50101fe

Please sign in to comment.