Masafumi Yokoyama
null+****@clear*****
Sun Nov 2 18:53:17 JST 2014
Masafumi Yokoyama 2014-11-02 18:53:17 +0900 (Sun, 02 Nov 2014) New Revision: 0093a7e3fd5976754f4c12c301b87310614eb3aa https://github.com/ranguba/rroonga/commit/0093a7e3fd5976754f4c12c301b87310614eb3aa Message: test: check zlib/lz4 support Modified files: test/test-schema-dumper.rb Modified: test/test-schema-dumper.rb (+14 -3) =================================================================== --- test/test-schema-dumper.rb 2014-11-02 18:20:52 +0900 (2234a00) +++ test/test-schema-dumper.rb 2014-11-02 18:53:17 +0900 (cc4cfb9) @@ -331,27 +331,38 @@ column_create Accounts name COLUMN_SCALAR ShortText end class ColumnCompressionTest < self + def setup + super + @context ||= Groonga::Context.default + end + def test_zlib define_column_compression_zlib_schema + flags = "COLUMN_SCALAR" + flags << "|COMPRESS_ZLIB" if****@conte*****_zlib? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY -column_create Posts title COLUMN_SCALAR|COMPRESS_ZLIB ShortText +column_create Posts title #{flags} ShortText SCHEMA end def test_lz4 define_column_compression_lz4_schema + flags = "COLUMN_SCALAR" + flags << "|COMPRESS_LZ4" if****@conte*****_lz4? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY -column_create Posts title COLUMN_SCALAR|COMPRESS_LZ4 ShortText +column_create Posts title #{flags} ShortText SCHEMA end def test_with_weight_vector define_column_compression_with_weight_vector_schema + flags = "COLUMN_VECTOR|WITH_WEIGHT" + flags << "|COMPRESS_ZLIB" if****@conte*****_zlib? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY -column_create Posts comments COLUMN_VECTOR|WITH_WEIGHT|COMPRESS_ZLIB ShortText +column_create Posts comments #{flags} ShortText SCHEMA end -------------- next part -------------- HTML����������������������������...Download