Sha256: 4cf12867cfb38386756359998dffa231d612ea9d9f5597c4bb8b250d26176d53
Contents?: true
Size: 345 Bytes
Versions: 3
Compression:
Stored size: 345 Bytes
Contents
require 'ansi/code' class TestANSICode < KO::TestCase include ANSI::Code test "base methods" do str = red + "Hello" + blue + "World" out = "\e[31mHello\e[34mWorld" out == str end test "block notation" do str = red { "Hello" } + blue { "World" } out = "\e[31mHello\e[0m\e[34mWorld\e[0m" out == str end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ansi-1.2.5 | test/case_ansicode.rb |
ansi-1.2.4 | test/case_ansicode.rb |
ansi-1.2.3 | test/case_ansicode.rb |