Skip to content
Browse files

Add test case for auto-linking text w/ Unicode supplementary character.

  • Loading branch information...
1 parent 0b5ebf9 commit a81dd1cc4888029572ab86e72b8951468436c05d @keitaf keitaf committed Jan 30, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/autolinking_spec.rb
View
6 spec/autolinking_spec.rb
@@ -541,6 +541,12 @@ def original_text; "Single char file ext http://www.bestbuy.com/site/Currie+Tech
auto_linked.should_not include('hashtag_classname')
end
+ it "should autolink url/hashtag/mention in text with Unicode supplementary characters" do
+ auto_linked = @linker.auto_link("#{[0x10400].pack('U')} #hashtag #{[0x10400].pack('U')} @mention #{[0x10400].pack('U')} http://twitter.com/")
+ auto_linked.should have_autolinked_hashtag('#hashtag')
+ auto_linked.should link_to_screen_name('mention')
+ auto_linked.should have_autolinked_url('http://twitter.com/')
+ end
end
end

0 comments on commit a81dd1c

Please sign in to comment.
Something went wrong with that request. Please try again.