require "test/unit" require "wiki_words" 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 def test_pimki_wiki_words assert_equal "XYZ", WikiWords.separate("XYZ") assert_equal "WXYZ", WikiWords.separate("WXYZ") assert_equal "XYZ to XML", WikiWords.separate("XYZ to XML") assert_equal "WXYZ to XML", WikiWords.separate("WXYZ to XML") assert_equal "XML Schema Stuff", WikiWords.separate("XMLSchemaStuff") assert_equal "Schema XML Stuff", WikiWords.separate("SchemaXMLStuff") assert_equal "Schema Stuff XML", WikiWords.separate("SchemaStuffXML") end end