Sha256: cc73b6c94bbf89abbbcfaaf0bb54a54e3707b4a0be4e202c25e8d925807630bc
Contents?: true
Size: 558 Bytes
Versions: 3
Compression:
Stored size: 558 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-2.2.1 | test/unit/test_bbcode.rb |
facets-2.1.3 | test/unit/test_bbcode.rb |
facets-2.2.0 | test/unit/test_bbcode.rb |