Sha256: f99d3d9b2c097a3ecb9329d3b444252110e87bdd0a30911f44765e86388ceeb8

Contents?: true

Size: 559 Bytes

Versions: 11

Compression:

Stored size: 559 Bytes

Contents

# Test for facets/bbcode.rb

require 'facets/bbcode.rb'
require 'test/unit'

class TC_BBCode < Test::Unit::TestCase

  def test_to_ansi
    str = "this is [COLOR=red]red[/COLOR], this is [B]bold[/B]"
    out = "this is \e[0;31mred\e[0m, this is \e[1mbold\e[0m\n"
    assert_equal( out, BBCode.bbcode_to_ansi(str) )
  end

  def test_to_html
    str = "this is [COLOR=red]red[/COLOR], this is [B]bold[/B]"
    out = "this is <font color=\"red\">red</font>, this is <strong>bold</strong><br />\n"
    assert_equal( out, BBCode.bbcode_to_html(str) )
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.6.0 test/more/test_bbcode.rb
facets-2.4.0 test/test_bbcode.rb
facets-2.3.0 test/more/test_bbcode.rb
facets-2.4.1 test/test_bbcode.rb
facets-2.4.3 test/more/test_bbcode.rb
facets-2.4.4 test/more/test_bbcode.rb
facets-2.4.2 test/more/test_bbcode.rb
facets-2.5.0 test/more/test_bbcode.rb
facets-2.5.1 test/more/test_bbcode.rb
facets-2.4.5 test/more/test_bbcode.rb
facets-2.5.2 test/more/test_bbcode.rb