summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-06-19 14:27:20 +0000
committerGo MAEDA <maeda@farend.jp>2024-06-19 14:27:20 +0000
commit5a96997f6a839d09fe9b22fd1f26d50b766da3e8 (patch)
tree696ed42376e060900fda650c855982a55ecb3a30 /test/unit
parent07307140b97ef8de5a952ae06ddc674bdc2b3f45 (diff)
downloadredmine-5a96997f6a839d09fe9b22fd1f26d50b766da3e8.tar.gz
redmine-5a96997f6a839d09fe9b22fd1f26d50b766da3e8.zip
Support multiple multi-word phrases in the search engine (#38446).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/search_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/search_test.rb b/test/unit/lib/redmine/search_test.rb
index 72cf14492..e2d77cca0 100644
--- a/test/unit/lib/redmine/search_test.rb
+++ b/test/unit/lib/redmine/search_test.rb
@@ -30,4 +30,9 @@ class Redmine::Search::Tokenize < ActiveSupport::TestCase
value = "全角\u3000スペース"
assert_equal %w[全角 スペース], Redmine::Search::Tokenizer.new(value).tokens
end
+
+ def test_tokenize_should_support_multiple_phrases
+ value = '"phrase one" "phrase two"'
+ assert_equal ["phrase one", "phrase two"], Redmine::Search::Tokenizer.new(value).tokens
+ end
end