aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/xapian_search_highlighting_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/integration/xapian_search_highlighting_spec.rb b/spec/integration/xapian_search_highlighting_spec.rb
index 65a34cf91..c0834a2c1 100644
--- a/spec/integration/xapian_search_highlighting_spec.rb
+++ b/spec/integration/xapian_search_highlighting_spec.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe 'highlighting search results' do
@@ -36,4 +38,13 @@ describe 'highlighting search results' do
highlight_matches(phrase, matches).should == '<mark>boring</mark>'
end
+ it 'handles macrons correctly' do
+ phrase = 'Māori'
+
+ search = ActsAsXapian::Search.new([PublicBody], phrase, :limit => 1)
+ matches = search.words_to_highlight(:regex => true, :include_original => true)
+
+ highlight_matches(phrase, matches).should == '<mark>Māori</mark>'
+ end
+
end