[Groonga-commit] ranguba/rroonga at b1f2e98 [master] Normalize TokenRegexp type

Back to archive index

Masafumi Yokoyama null+****@clear*****
Thu Apr 2 15:20:07 JST 2015


Masafumi Yokoyama	2015-04-02 15:20:07 +0900 (Thu, 02 Apr 2015)

  New Revision: b1f2e9893010c6b96459491dc2ef85b5ffc11f61
  https://github.com/ranguba/rroonga/commit/b1f2e9893010c6b96459491dc2ef85b5ffc11f61

  Merged 6f52262: Merge pull request #72 from ranguba/normalize-token-regexp-type

  Message:
    Normalize TokenRegexp type

  Modified files:
    lib/groonga/schema.rb
    test/test-schema-type.rb

  Modified: lib/groonga/schema.rb (+3 -1)
===================================================================
--- lib/groonga/schema.rb    2015-04-02 12:28:42 +0900 (c721436)
+++ lib/groonga/schema.rb    2015-04-02 15:20:07 +0900 (122b60f)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright (C) 2009-2014  Kouhei Sutou <kou �� clear-code.com>
-# Copyright (C) 2014  Masafumi Yokoyama <myokoym �� gmail.com>
+# Copyright (C) 2014-2015  Masafumi Yokoyama <yokoyama �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -598,6 +598,8 @@ module Groonga
         "token_trigram" => "TokenTrigram",
         "mecab" => "TokenMecab",
         "token_mecab"=> "TokenMecab",
+        "regexp" => "TokenRegexp",
+        "token_regexp"=> "TokenRegexp",
       }
       # @private
       def normalize_type(type, options={})

  Modified: test/test-schema-type.rb (+6 -0)
===================================================================
--- test/test-schema-type.rb    2015-04-02 12:28:42 +0900 (37806b9)
+++ test/test-schema-type.rb    2015-04-02 15:20:07 +0900 (55cbe10)
@@ -201,6 +201,12 @@ class SchemaTypeTest < Test::Unit::TestCase
     assert_normalize_type("TokenMecab", "TokenMecab")
   end
 
+  def test_normalize_regexp
+    assert_normalize_type("TokenRegexp", "regexp")
+    assert_normalize_type("TokenRegexp", "token_regexp")
+    assert_normalize_type("TokenRegexp", "TokenRegexp")
+  end
+
   private
   def assert_normalize_type(expected, type)
     assert_equal(expected, Groonga::Schema.normalize_type(type))
-------------- next part --------------
HTML����������������������������...
Download 



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