null+****@clear*****
null+****@clear*****
2011年 11月 8日 (火) 17:37:57 JST
Kouhei Sutou 2011-11-08 08:37:57 +0000 (Tue, 08 Nov 2011)
New Revision: f7baf9809c418a17d83e197349d5774276c52dc1
Log:
[test] add a test for groonga_version variable. fixes #1158
Added files:
test/sql/groonga_storage/r/variables.result.in
test/sql/groonga_storage/t/variables.test
Modified files:
.gitignore
configure.ac
test/sql/groonga_storage/r/files.am
test/sql/groonga_storage/t/files.am
Modified: .gitignore (+1 -0)
===================================================================
--- .gitignore 2011-11-07 06:22:53 +0000 (1108fa9)
+++ .gitignore 2011-11-08 08:37:57 +0000 (e958e62)
@@ -47,3 +47,4 @@ cscope.out
/misc/
/tmp-doc/
/test/sql/groonga_storage/r/information_schema.result
+/test/sql/groonga_storage/r/variables.result
Modified: configure.ac (+8 -0)
===================================================================
--- configure.ac 2011-11-07 06:22:53 +0000 (4075d99)
+++ configure.ac 2011-11-08 08:37:57 +0000 (a89fdf1)
@@ -152,6 +152,9 @@ AC_DEFUN([CONFIG_OPTION_MECAB],[
AC_DEFUN([CONFIG_OPTION_GROONGA],[
PKG_CHECK_MODULES(GROONGA, groonga >= 1.2.7)
+ _PKG_CONFIG(GROONGA_VERSION, variable=groonga_version, groonga)
+ GROONGA_VERSION=$pkg_cv_GROONGA_VERSION
+ AC_SUBST(GROONGA_VERSION)
])
AC_ARG_WITH(debug,
@@ -203,7 +206,11 @@ if test x"$default_parser" != x"no"; then
AC_DEFINE_UNQUOTED(MRN_PARSER_DEFAULT,
"$default_parser",
"specified default fulltext parser")
+ MRN_DEFAULT_PARSER=$default_parser
+else
+ MRN_DEFAULT_PARSER=TokenBigram
fi
+AC_SUBST(MRN_DEFAULT_PARSER)
AC_ARG_ENABLE(fast_mutexes,
[AC_HELP_STRING([--disable-fast-mutexes],
@@ -308,6 +315,7 @@ AC_CONFIG_FILES([
])
AC_OUTPUT([
test/sql/groonga_storage/r/information_schema.result
+ test/sql/groonga_storage/r/variables.result
packages/rpm/centos/mysql-groonga.spec
packages/rpm/fedora/mysql-groonga.spec
])
Modified: test/sql/groonga_storage/r/files.am (+2 -0)
===================================================================
--- test/sql/groonga_storage/r/files.am 2011-11-07 06:22:53 +0000 (383d181)
+++ test/sql/groonga_storage/r/files.am 2011-11-08 08:37:57 +0000 (dadf7cb)
@@ -63,9 +63,11 @@ result_files = \
update_id_unique_hash_index.result \
update_int.result \
update_virtual_column.result \
+ variables.result.in \
$(NULL)
generated_files = \
information_schema.result \
+ variables.result \
$(NULL)
Added: test/sql/groonga_storage/r/variables.result.in (+3 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_storage/r/variables.result.in 2011-11-08 08:37:57 +0000 (030ba3c)
@@ -0,0 +1,3 @@
+show variables like 'groonga_version';
+Variable_name Value
+groonga_version @VERSION@
Modified: test/sql/groonga_storage/t/files.am (+1 -0)
===================================================================
--- test/sql/groonga_storage/t/files.am 2011-11-07 06:22:53 +0000 (cf25d1e)
+++ test/sql/groonga_storage/t/files.am 2011-11-08 08:37:57 +0000 (0f67b06)
@@ -63,6 +63,7 @@ test_files = \
update_id_unique_hash_index.test \
update_int.test \
update_virtual_column.test \
+ variables.test \
$(NULL)
generated_files = \
Added: test/sql/groonga_storage/t/variables.test (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_storage/t/variables.test 2011-11-08 08:37:57 +0000 (08f08cb)
@@ -0,0 +1,22 @@
+# Copyright(C) 2011 Kouhei Sutou <kou****@clear*****>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source suite/groonga_include/groonga_init.inc
+
+# show variables like 'groonga%';
+show variables like 'groonga_version';
+
+--source suite/groonga_include/groonga_deinit.inc