[Groonga-commit] ranguba/rroonga at a93bb76 [master] Add a test for TokenRegexp to default tokenizer

Back to archive index

Masafumi Yokoyama null+****@clear*****
Thu Apr 2 17:53:15 JST 2015


Masafumi Yokoyama	2015-04-02 17:53:15 +0900 (Thu, 02 Apr 2015)

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

  Merged 717ac69: Merge pull request #78 from ranguba/add-a-test-for-token-regexp

  Message:
    Add a test for TokenRegexp to default tokenizer
    
    GitHub: fix #61

  Added files:
    test/test-token-regexp.rb

  Added: test/test-token-regexp.rb (+30 -0) 100644
===================================================================
--- /dev/null
+++ test/test-token-regexp.rb    2015-04-02 17:53:15 +0900 (65eda61)
@@ -0,0 +1,30 @@
+# Copyright (C) 2015  Masafumi 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
+# License version 2.1 as published by the Free Software Foundation.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TokenRegexpTest < Test::Unit::TestCase
+  include GroongaTestUtils
+
+  def setup
+    setup_database
+  end
+
+  def test_default_tokenizer
+    terms = Groonga::PatriciaTrie.create(:name => "Terms",
+                                         :key_type => "ShortText",
+                                         :default_tokenizer => "TokenRegexp")
+    assert_equal(context["TokenRegexp"],
+                 terms.default_tokenizer)
+  end
+end
-------------- next part --------------
HTML����������������������������...
다운로드 



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