summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorleeight <leeight@gmail.com>2011-09-23 22:39:17 +0800
committerPeng Wu <alexepico@gmail.com>2011-09-26 12:43:41 +0800
commit48fa6408f09833129bf56e33bdb3aa949ca213aa (patch)
tree8adefc6b976087bbfbbe936466ab35b99520301f /tests
parentffef5f16f7f1bc7c0c0cbbfa73e21728c32d7669 (diff)
downloadlibpinyin-48fa6408f09833129bf56e33bdb3aa949ca213aa.tar.gz
libpinyin-48fa6408f09833129bf56e33bdb3aa949ca213aa.tar.xz
libpinyin-48fa6408f09833129bf56e33bdb3aa949ca213aa.zip
FIX core dump issues and upgrade .gitignore
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pinyin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
index 31aec84..5fe97ee 100644
--- a/tests/test_pinyin.cpp
+++ b/tests/test_pinyin.cpp
@@ -37,8 +37,13 @@ int main(int argc, char * argv[]){
linebuf[strlen(linebuf) - 1] = '\0';
}
- if ( strcmp ( linebuf, "quit" ) == 0)
+ if ( strcmp ( linebuf, "quit" ) == 0) {
break;
+ }
+
+ if (linebuf[0] == '\0') {
+ continue;
+ }
pinyin_parse_more_full_pinyins(instance, linebuf);
pinyin_guess_sentence(instance);