Sha256: 239af8920cae9cbeb896403fa6b0d85fcb7808708127fdef47968285cf9c87fa

Contents?: true

Size: 895 Bytes

Versions: 3

Compression:

Stored size: 895 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
Pimki-1.7.092 app/models/wiki_words_test.rb
Pimki-1.8.092 app/models/wiki_words_test.rb
Pimki-1.8.200 app/models/wiki_words_test.rb