summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-11-30 15:42:30 +0000
committerGo MAEDA <maeda@farend.jp>2018-11-30 15:42:30 +0000
commite23b2023cbc0ac9f7d871156107556795859b05e (patch)
treebbd717c3d3cfd45a94796513fbe7421ef6f3c1d1 /test
parent198212f991573308b74d93a1e524497dd222dfc4 (diff)
downloadredmine-e23b2023cbc0ac9f7d871156107556795859b05e.tar.gz
redmine-e23b2023cbc0ac9f7d871156107556795859b05e.zip
Allow single Chinese character as a search keyword (#30037).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17667 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/search_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/search_test.rb b/test/unit/search_test.rb
index ab2bab1ff..a6ae15d0b 100644
--- a/test/unit/search_test.rb
+++ b/test/unit/search_test.rb
@@ -194,6 +194,11 @@ class SearchTest < ActiveSupport::TestCase
assert_equal ['Special', 'chars', 'in a phrase Öö'], f.tokens
end
+ def test_fetcher_should_exclude_single_character_tokens_except_for_chinese_characters
+ f = Redmine::Search::Fetcher.new('ca f é 漢 あ 한', User.anonymous, %w(issues), Project.all)
+ assert_equal ['ca', '漢'], f.tokens
+ end
+
private
def remove_permission(role, permission)