[Groonga-commit] groonga/groonga-command at 72b1b4c [master] Add normalizer reader

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 14 18:02:41 JST 2014


Kouhei Sutou	2014-03-14 18:02:41 +0900 (Fri, 14 Mar 2014)

  New Revision: 72b1b4c4edb6dbc7a77062487ff046e1d48c7295
  https://github.com/groonga/groonga-command/commit/72b1b4c4edb6dbc7a77062487ff046e1d48c7295

  Message:
    Add normalizer reader

  Modified files:
    lib/groonga/command/table-create.rb
    test/command/test-table-create.rb

  Modified: lib/groonga/command/table-create.rb (+6 -0)
===================================================================
--- lib/groonga/command/table-create.rb    2014-03-14 18:01:10 +0900 (2b621e5)
+++ lib/groonga/command/table-create.rb    2014-03-14 18:02:41 +0900 (6dcf50a)
@@ -86,6 +86,12 @@ module Groonga
       def default_tokenizer
         self[:default_tokenizer]
       end
+
+      # @return [String, nil] Normalizer name or nil.
+      # @since 1.0.7
+      def normalizer
+        self[:normalizer]
+      end
     end
   end
 end

  Modified: test/command/test-table-create.rb (+12 -0)
===================================================================
--- test/command/test-table-create.rb    2014-03-14 18:01:10 +0900 (a05742c)
+++ test/command/test-table-create.rb    2014-03-14 18:02:41 +0900 (6666a94)
@@ -173,4 +173,16 @@ class TableCreateCommandTest < Test::Unit::TestCase
       assert_nil(command.default_tokenizer)
     end
   end
+
+  class NormalizerTest < self
+    def test_specified
+      command = table_create_command({"normalizer" => "NormalizerAuto"})
+      assert_equal("NormalizerAuto", command.normalizer)
+    end
+
+    def test_omitted
+      command = table_create_command
+      assert_nil(command.normalizer)
+    end
+  end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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