tmud-2.10.1/benchmark/
tmud-2.10.1/cmd/
tmud-2.10.1/cmd/objects/
tmud-2.10.1/cmd/tiny/
tmud-2.10.1/doc/classes/SQLite/
tmud-2.10.1/doc/classes/SQLite3/
tmud-2.10.1/doc/classes/TernaryTrie/
tmud-2.10.1/doc/files/cmd/objects/
tmud-2.10.1/doc/files/cmd/tiny/
tmud-2.10.1/doc/files/lib/
tmud-2.10.1/doc/files/lib/engine/
tmud-2.10.1/doc/files/lib/farts/
tmud-2.10.1/farts/
tmud-2.10.1/lib/
tmud-2.10.1/lib/core/
tmud-2.10.1/lib/engine/
tmud-2.10.1/lib/farts/
tmud-2.10.1/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