[Groonga-mysql-commit] mroonga/mroonga [master] [test] add a test for tinyint.

Zurück zum Archiv-Index

null+****@clear***** null+****@clear*****
2011年 6月 11日 (土) 11:06:04 JST


Kouhei Sutou	2011-06-11 02:06:04 +0000 (Sat, 11 Jun 2011)

  New Revision: 5c97b26a1ba6e33d7ab8196d3e864550a8247e94

  Log:
    [test] add a test for tinyint.

  Added files:
    test/sql/r/tinyint.result
    test/sql/t/tinyint.test
  Modified files:
    test/sql/r/Makefile.am
    test/sql/t/Makefile.am

  Modified: test/sql/r/Makefile.am (+29 -27)
===================================================================
--- test/sql/r/Makefile.am    2011-06-11 01:52:54 +0000 (8427497)
+++ test/sql/r/Makefile.am    2011-06-11 02:06:04 +0000 (3a954d9)
@@ -1,27 +1,29 @@
-# ls *.result | sort | sed -e 's/^/\t/'
-EXTRA_DIST =					\
-	auto_increment.result			\
-	binlog.result				\
-	btree.result				\
-	count_performance.result		\
-	create_table.result			\
-	create_table_wrapper.result		\
-	delete.result				\
-	drop_database.result			\
-	drop_table.result			\
-	flush_logs.result			\
-	fulltext.result				\
-	fulltext_wrapper.result			\
-	hash.result				\
-	information_schema.result		\
-	insert.result				\
-	last_insert_grn_id.result		\
-	log_level.result			\
-	order_limit_performance.result		\
-	replace.result				\
-	select_all.result			\
-	select_pkey.result			\
-	select_secondary_key.result		\
-	show_create_table.result		\
-	show_table_status.result		\
-	update.result
+# echo "EXTRA_DIST = \\"; ls *.result | sort | sed -e 's/^/\t/' -e 's,$, \\,'; echo -n "\t\$(NULL)"
+EXTRA_DIST = \
+	auto_increment.result \
+	binlog.result \
+	btree.result \
+	count_performance.result \
+	create_table.result \
+	create_table_wrapper.result \
+	delete.result \
+	drop_database.result \
+	drop_table.result \
+	flush_logs.result \
+	fulltext.result \
+	fulltext_wrapper.result \
+	hash.result \
+	information_schema.result \
+	insert.result \
+	last_insert_grn_id.result \
+	log_level.result \
+	order_limit_performance.result \
+	replace.result \
+	select_all.result \
+	select_pkey.result \
+	select_secondary_key.result \
+	show_create_table.result \
+	show_table_status.result \
+	tinyint.result \
+	update.result \
+	$(NULL)

  Added: test/sql/r/tinyint.result (+18 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/r/tinyint.result    2011-06-11 02:06:04 +0000 (8dde1bd)
@@ -0,0 +1,18 @@
+drop table if exists books;
+create table books(title varchar(255), published tinyint);
+insert into books values ("MySQL", 1);
+insert into books values ("groonga", 1);
+insert into books values ("mroonga", 0);
+select count(*) from books where published = 0;
+count(*)
+1
+select count(*) from books where published = 1;
+count(*)
+2
+select count(*) from books where published != 2;
+count(*)
+3
+select count(*) from books where published != 1;
+count(*)
+1
+drop table books;

  Modified: test/sql/t/Makefile.am (+29 -27)
===================================================================
--- test/sql/t/Makefile.am    2011-06-11 01:52:54 +0000 (0ecd1f4)
+++ test/sql/t/Makefile.am    2011-06-11 02:06:04 +0000 (dfcc050)
@@ -1,27 +1,29 @@
-# ls *.test | sort | sed -e 's/^/\t/'
-EXTRA_DIST =					\
-	auto_increment.test			\
-	binlog.test				\
-	btree.test				\
-	count_performance.test			\
-	create_table.test			\
-	create_table_wrapper.test		\
-	delete.test				\
-	drop_database.test			\
-	drop_table.test				\
-	flush_logs.test				\
-	fulltext.test				\
-	fulltext_wrapper.test			\
-	hash.test				\
-	information_schema.test			\
-	insert.test				\
-	last_insert_grn_id.test			\
-	log_level.test				\
-	order_limit_performance.test		\
-	replace.test				\
-	select_all.test				\
-	select_pkey.test			\
-	select_secondary_key.test		\
-	show_create_table.test			\
-	show_table_status.test			\
-	update.test
+# echo "EXTRA_DIST = \\"; ls *.test | sort | sed -e 's/^/\t/' -e 's,$, \\,'; echo -n "\t\$(NULL)"
+EXTRA_DIST = \
+	auto_increment.test \
+	binlog.test \
+	btree.test \
+	count_performance.test \
+	create_table.test \
+	create_table_wrapper.test \
+	delete.test \
+	drop_database.test \
+	drop_table.test \
+	flush_logs.test \
+	fulltext.test \
+	fulltext_wrapper.test \
+	hash.test \
+	information_schema.test \
+	insert.test \
+	last_insert_grn_id.test \
+	log_level.test \
+	order_limit_performance.test \
+	replace.test \
+	select_all.test \
+	select_pkey.test \
+	select_secondary_key.test \
+	show_create_table.test \
+	show_table_status.test \
+	tinyint.test \
+	update.test \
+	$(NULL)

  Added: test/sql/t/tinyint.test (+35 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/t/tinyint.test    2011-06-11 02:06:04 +0000 (d52d279)
@@ -0,0 +1,35 @@
+# 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.inc
+
+--disable_warnings
+drop table if exists books;
+--enable_warnings
+
+create table books(title varchar(255), published tinyint);
+insert into books values ("MySQL", 1);
+insert into books values ("groonga", 1);
+insert into books values ("mroonga", 0);
+
+select count(*) from books where published = 0;
+select count(*) from books where published = 1;
+select count(*) from books where published != 2;
+select count(*) from books where published != 1;
+
+drop table books;
+
+--source suite/groonga/include/groonga_deinit.inc




Groonga-mysql-commit メーリングリストの案内
Zurück zum Archiv-Index