diff options
author | Peng Wu <alexepico@gmail.com> | 2011-11-28 15:51:09 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-11-28 15:51:09 +0800 |
commit | b90b28bc329c1c7db4ea3e085b10218b3f6c47f2 (patch) | |
tree | 8661593afc6584f99c9eb12a692a8f7af81dc01a | |
parent | f87b9baab899ef0afa61f16757e63c926ffa1b81 (diff) | |
download | libpinyin-b90b28bc329c1c7db4ea3e085b10218b3f6c47f2.tar.gz libpinyin-b90b28bc329c1c7db4ea3e085b10218b3f6c47f2.tar.xz libpinyin-b90b28bc329c1c7db4ea3e085b10218b3f6c47f2.zip |
begin to add test parser2
-rw-r--r-- | tests/storage/Makefile.am | 7 | ||||
-rw-r--r-- | tests/storage/test_parser2.cpp | 42 |
2 files changed, 48 insertions, 1 deletions
diff --git a/tests/storage/Makefile.am b/tests/storage/Makefile.am index d6a4c3a..87f5504 100644 --- a/tests/storage/Makefile.am +++ b/tests/storage/Makefile.am @@ -27,7 +27,8 @@ noinst_PROGRAMS = test_parser \ test_phrase_index_logger \ test_phrase_table \ test_ngram \ - test_flexible_ngram + test_flexible_ngram \ + test_parser2 test_parser_SOURCES = test_parser.cpp @@ -59,3 +60,7 @@ test_flexible_ngram_SOURCES = test_flexible_ngram.cpp test_flexible_ngram_LDADD = ../../src/libpinyin_internal.la \ @GLIB2_LDFLAGS@ + +test_parser2_SOURCES = test_parser2.cpp + +test_parser2_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@ diff --git a/tests/storage/test_parser2.cpp b/tests/storage/test_parser2.cpp new file mode 100644 index 0000000..be22351 --- /dev/null +++ b/tests/storage/test_parser2.cpp @@ -0,0 +1,42 @@ +/* + * libpinyin + * Library to deal with pinyin. + * + * Copyright (C) 2011 Peng Wu <alexepico@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +#include <stdio.h> + +static const char * help_msg = + "Usage:\n" + " test-parser -p <parser> [-s <scheme>] [options].\n\n" + " -p <parser> fullpinyin/doublepinyin/chewing.\n" + " -s <scheme> specify scheme for doublepinyin/chewing.\n" + " schemes for doublepinyin: zrm, ms, ziguang, abc, pyjj, xhe.\n" + " schemes for chewing: standard, ibm, ginyieh, eten.\n" + " -i Use incomplete pinyin.\n" + ; + + +void print_help(){ + printf(help_msg); +} + +int main(int argc, char * argv[]) { + return 0; +} |