[Groonga-commit] droonga/fluent-plugin-droonga at 5e80be2 [catalog-schema] schema: Add tests of flags for columns

Back to archive index

Yoji Shidara null+****@clear*****
Tue Feb 18 16:35:17 JST 2014


Yoji Shidara	2014-02-18 16:35:17 +0900 (Tue, 18 Feb 2014)

  New Revision: 5e80be2dcc5ddf99b79edce013d50093f4e92e60
  https://github.com/droonga/fluent-plugin-droonga/commit/5e80be2dcc5ddf99b79edce013d50093f4e92e60

  Message:
    schema: Add tests of flags for columns

  Modified files:
    test/unit/catalog/test_schema.rb

  Modified: test/unit/catalog/test_schema.rb (+18 -0)
===================================================================
--- test/unit/catalog/test_schema.rb    2014-02-18 16:34:53 +0900 (4af2cb5)
+++ test/unit/catalog/test_schema.rb    2014-02-18 16:35:17 +0900 (b19b528)
@@ -158,6 +158,17 @@ class CatalogSchemaTest < Test::Unit::TestCase
                                      "valueType" => "ShortText"
                                    }).value_type)
       end
+
+      def test_flags_with_column_index_options
+        assert_equal(["COLUMN_SCALAR", "WITH_SECTION"],
+                     create_column("column_name",
+                                   {
+                                     "type" => "Scalar",
+                                     "indexOptions" => {
+                                       "section" => true
+                                     }
+                                   }).flags)
+      end
     end
 
     class ColumnIndexOptionsTest < self
@@ -185,6 +196,13 @@ class CatalogSchemaTest < Test::Unit::TestCase
                                       "position" => true
                                     }).position)
       end
+
+      def test_flags
+        assert_equal(["WITH_SECTION"],
+                     create_options({
+                                      "section" => true
+                                    }).flags)
+      end
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index