test/lib/vedeu/support/esc_test.rb in vedeu-0.1.7 vs test/lib/vedeu/support/esc_test.rb in vedeu-0.1.8
- old
+ new
@@ -40,19 +40,31 @@
it 'returns an escape sequence when the style is clear' do
Esc.string('clear').must_equal("\e[38;2;39m\e[48;2;49m\e[2J")
end
+ it 'returns an escape sequence when the style is clear_line' do
+ Esc.string('clear_line').must_equal("\e[38;2;39m\e[48;2;49m\e[2K")
+ end
+
it 'returns an escape sequence when the style is colour_reset' do
Esc.string('colour_reset').must_equal("\e[38;2;39m\e[48;2;49m")
end
it 'returns an escape sequence when the style is fg_reset' do
Esc.string('fg_reset').must_equal("\e[38;2;39m")
end
it 'returns an escape sequence when the style is hide_cursor' do
Esc.string('hide_cursor').must_equal("\e[?25l")
+ end
+
+ it 'returns an escape sequence when the style is screen_init' do
+ Esc.string('screen_init').must_equal("\e[0m\e[38;2;39m\e[48;2;49m\e[2J\e[?25l")
+ end
+
+ it 'returns an escape sequence when the style is screen_exit' do
+ Esc.string('screen_exit').must_equal("\e[?25h\e[38;2;39m\e[48;2;49m\e[0m")
end
it 'returns an escape sequence when the style is negative' do
Esc.string('negative').must_equal("\e[7m")
end