summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-11-03 12:43:28 +0000
committerGo MAEDA <maeda@farend.jp>2022-11-03 12:43:28 +0000
commitb9379e7a26bce4ba76108da1b6f13ea22e236632 (patch)
tree0399f6f692bacb46359d516dda697c6c1b6ee4cd /test
parentfcf1352c6b19f1dcb8872367a1313cbffb551093 (diff)
downloadredmine-b9379e7a26bce4ba76108da1b6f13ea22e236632.tar.gz
redmine-b9379e7a26bce4ba76108da1b6f13ea22e236632.zip
Allow using ideographic space (U+3000) as a separator for search terms (#37878).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21952 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/search_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/search_test.rb b/test/unit/lib/redmine/search_test.rb
index e2944b4ac..219f40cfd 100644
--- a/test/unit/lib/redmine/search_test.rb
+++ b/test/unit/lib/redmine/search_test.rb
@@ -24,4 +24,10 @@ class Redmine::Search::Tokenize < ActiveSupport::TestCase
value = "hello \"bye bye\""
assert_equal ["hello", "bye bye"], Redmine::Search::Tokenizer.new(value).tokens
end
+
+ def test_tokenize_should_consider_ideographic_space_as_separator
+ # U+3000 is an ideographic space (" ")
+ value = "全角\u3000スペース"
+ assert_equal %w[全角 スペース], Redmine::Search::Tokenizer.new(value).tokens
+ end
end