Sha256: 885c77b11d74673e3b51623d4918efe765591c93e45204cdc32f66a92d13594e

Contents?: true

Size: 783 Bytes

Versions: 1

Compression:

Stored size: 783 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/more/bbcode.rb
#
# Extracted Wed Aug 23 18:22:52 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/more/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

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.30 test/lib/facets/more/test_bbcode.rb