summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-09 07:35:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-09 07:35:48 +0000
commit3a3fe668c77cdb3266bfd1b067a30a1c09713763 (patch)
tree87a5e51ad877bff7e4c0195073f1435f5f1be0ed /test
parent85866cdcf30dc130f31ac65c3e3e694c58be6cfa (diff)
downloadredmine-3a3fe668c77cdb3266bfd1b067a30a1c09713763.tar.gz
redmine-3a3fe668c77cdb3266bfd1b067a30a1c09713763.zip
Fix tokenization of phrases with non-ascii chars (#20730).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@14662 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/search_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/search_test.rb b/test/unit/search_test.rb
index bd9477025..b640202e8 100644
--- a/test/unit/search_test.rb
+++ b/test/unit/search_test.rb
@@ -190,6 +190,14 @@ class SearchTest < ActiveSupport::TestCase
Redmine::Database.reset
end
+ def test_fetcher_should_handle_accents_in_phrases
+ f = Redmine::Search::Fetcher.new('No special chars "in a phrase"', User.anonymous, %w(issues), Project.all)
+ assert_equal ['No', 'special', 'chars', 'in a phrase'], f.tokens
+
+ f = Redmine::Search::Fetcher.new('Special chars "in a phrase Öö"', User.anonymous, %w(issues), Project.all)
+ assert_equal ['Special', 'chars', 'in a phrase Öö'], f.tokens
+ end
+
private
def remove_permission(role, permission)