Sha256: 36d051733f6dbee7c5695ec594730fea0850ed6cdc08dd95c9c23fc43d63b37e
Contents?: true
Size: 530 Bytes
Versions: 3
Compression:
Stored size: 530 Bytes
Contents
require 'test/unit' require 'facet/bbcode' 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-0.7.0 | test/tc_bbcode.rb |
facets-0.7.1 | test/tc_bbcode.rb |
facets-0.7.2 | test/tc_bbcode.rb |