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