tmud-3.0.0/benchmark/
tmud-3.0.0/cmd/
tmud-3.0.0/cmd/objects/
tmud-3.0.0/cmd/tiny/
tmud-3.0.0/doc/SQLite/
tmud-3.0.0/doc/SQLite3/
tmud-3.0.0/doc/TernaryTrie/
tmud-3.0.0/farts/
tmud-3.0.0/lib/
tmud-3.0.0/lib/engine/
tmud-3.0.0/lib/farts/
tmud-3.0.0/logs/
# Code Generated by ZenTest v. 2.3.0
#                 classname: asrt / meth =  ratio%
#               ColorFilter:    2 /    2 = 100.00%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'network/protocol/colorfilter'
require 'flexmock'
end

class TestColorFilter < Test::Unit::TestCase
  def setup
    @color = false
    @pstack = FlexMock.new
    @pstack.mock_handle(:color_on) { @color = !@color }
    @filter = ColorFilter.new(@pstack)
  end

  def test_filter_out
    assert_equal("\e[0;30mhello\e[0m",
      @filter.filter_out("[COLOR Black]hello[/COLOR]"))
    assert_equal("hello",
      @filter.filter_out("[COLOR Black]hello[/COLOR]"))
  end
end