2007-01-22 14:43:50 +01:00
|
|
|
#!/usr/bin/env ruby
|
2008-11-12 16:47:24 +01:00
|
|
|
#coding: utf-8
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
|
|
|
|
|
|
|
class WikiWordsTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
def test_utf8_characters_in_wiki_word
|
|
|
|
assert_equal "Æåle Øen", WikiWords.separate("ÆåleØen")
|
|
|
|
assert_equal "ÆÅØle Øen", WikiWords.separate("ÆÅØleØen")
|
|
|
|
assert_equal "Æe ÅØle Øen", WikiWords.separate("ÆeÅØleØen")
|
|
|
|
assert_equal "Legetøj", WikiWords.separate("Legetøj")
|
|
|
|
end
|
2008-12-26 00:41:35 +01:00
|
|
|
|
|
|
|
def test_multiple_leading_capital_letters
|
|
|
|
assert_equal "CMy App", WikiWords.separate("CMyApp")
|
|
|
|
end
|
2007-01-22 14:43:50 +01:00
|
|
|
end
|