diff options
author | Go MAEDA <maeda@farend.jp> | 2022-11-03 12:43:28 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-11-03 12:43:28 +0000 |
commit | b9379e7a26bce4ba76108da1b6f13ea22e236632 (patch) | |
tree | 0399f6f692bacb46359d516dda697c6c1b6ee4cd /test | |
parent | fcf1352c6b19f1dcb8872367a1313cbffb551093 (diff) | |
download | redmine-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.rb | 6 |
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 |