Sha256: c2d9dcdb80103a4ad49b988dc8a4c517811236fc92ee6419453ea3720f8e9c20
Contents?: true
Size: 382 Bytes
Versions: 3
Compression:
Stored size: 382 Bytes
Contents
require 'test/unit' require 'ansicode' class TestANSICode < Test::Unit::TestCase include ANSICode def test_methods str = red + "Hello" + blue + "World" out = "\e[31mHello\e[34mWorld" assert_equal( out, str ) end def test_blocks str = red { "Hello" } + blue { "World" } out = "\e[31mHello\e[0m\e[34mWorld\e[0m" assert_equal( out, str ) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ansi-1.1.0 | test/test_ansicode.rb |
ansi-1.0.1 | test/test_ansicode.rb |
ansi-1.0.0 | test/test_ansicode.rb |