From b90b28bc329c1c7db4ea3e085b10218b3f6c47f2 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 28 Nov 2011 15:51:09 +0800 Subject: begin to add test parser2 --- tests/storage/Makefile.am | 7 ++++++- tests/storage/test_parser2.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 tests/storage/test_parser2.cpp (limited to 'tests') 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 + * + * 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 + +static const char * help_msg = + "Usage:\n" + " test-parser -p [-s ] [options].\n\n" + " -p fullpinyin/doublepinyin/chewing.\n" + " -s 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; +} -- cgit