/lib/rex/ui/text/color.rb.ut.rb
https://bitbucket.org/technopunk2099/metasploit-framework · Ruby · 19 lines · 11 code · 6 blank · 2 comment · 0 complexity · 5e280a7aa32c342ae26a114d2fa37198 MD5 · raw file
- #!/usr/bin/env ruby
- # -*- coding: binary -*-
- $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..'))
- require 'test/unit'
- require 'rex/ui/text/color'
- class Rex::Ui::Text::Color::UnitTest < Test::Unit::TestCase
- def test_color
- color = Rex::Ui::Text::Color.new.ansi('bold', 'red')
- color += 'hey sup'
- color += Rex::Ui::Text::Color.new.ansi('clear')
- assert_equal("\e[1;31mhey sup\e[0m", color)
- end
- end