Class: TestANSI

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/automate-em/interfaces/OLD CODE/telnet/ansi.rb

Instance Method Summary collapse

Instance Method Details

#test_strbreakObject



128
129
130
131
# File 'lib/automate-em/interfaces/OLD CODE/telnet/ansi.rb', line 128

def test_strbreak
	assert_equal( ["ab\e[34;56mc", "d"], ANSI.strbreak("ab\e[34;56mcd", 3) )
	assert_equal( ["ab\e[34;56m", "c\e[12;34r\e[Hd", "e"], ANSI.strbreak("ab\e[34;56mc\e[12;34r\e[Hde", 2) )
end

#test_strclipObject



121
122
123
124
125
126
# File 'lib/automate-em/interfaces/OLD CODE/telnet/ansi.rb', line 121

def test_strclip
	assert_equal( "ab\e[34;56mc", ANSI.strclip("ab\e[34;56mcd", 3) )
	assert_equal( "ab\e[34;56mc\e[12;34r\e[H", ANSI.strclip("ab\e[34;56mc\e[12;34r\e[Hd", 3) )
	assert_equal( "ab\e[34;56mc\e[12;34r\e[Hd", ANSI.strclip("ab\e[34;56mc\e[12;34r\e[Hde", 4) )
	assert_equal( "ab\e[34;56mc\e[12;34r\e[Hde", ANSI.strclip("ab\e[34;56mc\e[12;34r\e[Hde", 5) )
end