null+****@clear*****
null+****@clear*****
2011年 9月 25日 (日) 09:36:31 JST
Kouhei Sutou 2011-09-25 00:36:31 +0000 (Sun, 25 Sep 2011)
New Revision: f7a89c10792efd533f5510d8025aed058a31550c
Log:
[wrapper][test] split fulltext search test for Japanese.
Added files:
test/sql/groonga_wrapper/r/fulltext_search_japanese.result
test/sql/groonga_wrapper/t/fulltext_search_japanese.test
Modified files:
test/sql/groonga_wrapper/r/fulltext.result
test/sql/groonga_wrapper/t/fulltext.test
Modified: test/sql/groonga_wrapper/r/fulltext.result (+0 -17)
===================================================================
--- test/sql/groonga_wrapper/r/fulltext.result 2011-09-25 00:35:16 +0000 (ef24f0e)
+++ test/sql/groonga_wrapper/r/fulltext.result 2011-09-25 00:36:31 +0000 (c0ffd4c)
@@ -1,21 +1,4 @@
drop table if exists t1, t2, t3;
-set names utf8;
-create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"';
-insert into t1 values(1, "明日の富士山の天気について","あああああああ");
-insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
-insert into t1 values(3, "dummy", "dummy");
-select * from t1;
-c1 c2 c3
-1 明日の富士山の天気について あああああああ
-2 いいいいい 明日の富士山の天気は分かりません
-3 dummy dummy
-select * from t1 where match(c2) against("富士山");
-c1 c2 c3
-1 明日の富士山の天気について あああああああ
-select * from t1 where match(c3) against("富士山");
-c1 c2 c3
-2 いいいいい 明日の富士山の天気は分かりません
-drop table t1;
create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"';
create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"';
insert into t1 values (1, "aa ii uu ee oo");
Added: test/sql/groonga_wrapper/r/fulltext_search_japanese.result (+18 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/r/fulltext_search_japanese.result 2011-09-25 00:36:31 +0000 (6c73f46)
@@ -0,0 +1,18 @@
+drop table if exists t1, t2, t3;
+set names utf8;
+create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"';
+insert into t1 values(1, "明日の富士山の天気について","あああああああ");
+insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
+insert into t1 values(3, "dummy", "dummy");
+select * from t1;
+c1 c2 c3
+1 明日の富士山の天気について あああああああ
+2 いいいいい 明日の富士山の天気は分かりません
+3 dummy dummy
+select * from t1 where match(c2) against("富士山");
+c1 c2 c3
+1 明日の富士山の天気について あああああああ
+select * from t1 where match(c3) against("富士山");
+c1 c2 c3
+2 いいいいい 明日の富士山の天気は分かりません
+drop table t1;
Modified: test/sql/groonga_wrapper/t/fulltext.test (+0 -10)
===================================================================
--- test/sql/groonga_wrapper/t/fulltext.test 2011-09-25 00:35:16 +0000 (85efed3)
+++ test/sql/groonga_wrapper/t/fulltext.test 2011-09-25 00:36:31 +0000 (fc0a195)
@@ -21,16 +21,6 @@
drop table if exists t1, t2, t3;
--enable_warnings
-set names utf8;
-create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"';
-insert into t1 values(1, "明日の富士山の天気について","あああああああ");
-insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
-insert into t1 values(3, "dummy", "dummy");
-select * from t1;
-select * from t1 where match(c2) against("富士山");
-select * from t1 where match(c3) against("富士山");
-drop table t1;
-
create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"';
create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"';
insert into t1 values (1, "aa ii uu ee oo");
Added: test/sql/groonga_wrapper/t/fulltext_search_japanese.test (+34 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/t/fulltext_search_japanese.test 2011-09-25 00:36:31 +0000 (4885d79)
@@ -0,0 +1,34 @@
+# Copyright(C) 2010 Tetsuro IKEDA
+# 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
+
+--disable_warnings
+drop table if exists t1, t2, t3;
+--enable_warnings
+
+set names utf8;
+create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"';
+insert into t1 values(1, "明日の富士山の天気について","あああああああ");
+insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
+insert into t1 values(3, "dummy", "dummy");
+select * from t1;
+select * from t1 where match(c2) against("富士山");
+select * from t1 where match(c3) against("富士山");
+drop table t1;
+
+--source suite/groonga_include/groonga_deinit.inc