aboutsummaryrefslogtreecommitdiffstats
path: root/t/escape_test.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-22 11:35:50 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-22 11:35:50 -0400
commit4afd275b89be802582e1b4dd665411e18f30336d (patch)
tree67d8c96da2ef220d27acf703dbac7f1d1edd404f /t/escape_test.py
parent1921191b4951a6517788634fc51dedffbff9195d (diff)
downloadlibvt100-python-4afd275b89be802582e1b4dd665411e18f30336d.tar.gz
libvt100-python-4afd275b89be802582e1b4dd665411e18f30336d.zip
rename a bunch of methods
Diffstat (limited to 't/escape_test.py')
-rw-r--r--t/escape_test.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/t/escape_test.py b/t/escape_test.py
index 947bf8b..f657e29 100644
--- a/t/escape_test.py
+++ b/t/escape_test.py
@@ -10,29 +10,29 @@ class EscapeTest(VT100Test):
def test_ri(self):
self.process("foo\nbar\033Mbaz")
- assert self.vt.get_string_plaintext(0, 0, 23, 79) == 'foo baz\n bar' + ('\n' * 23)
+ assert self.vt.window_contents(0, 0, 23, 79) == 'foo baz\n bar' + ('\n' * 23)
def test_ris(self):
- row, col = self.vt.cursor_pos()
+ row, col = self.vt.cursor_position()
assert row == 0
assert col == 0
cell = self.vt.cell(0, 0)
assert cell.contents() == ""
- assert self.vt.get_string_plaintext(0, 0, 500, 500) == ('\n' * 24)
- assert self.vt.get_string_formatted(0, 0, 500, 500) == ('\n' * 24)
+ assert self.vt.window_contents(0, 0, 500, 500) == ('\n' * 24)
+ assert self.vt.window_contents_formatted(0, 0, 500, 500) == ('\n' * 24)
assert self.vt.title() == ""
assert self.vt.icon_name() == ""
- assert self.vt.default_fgcolor() is None
- assert self.vt.default_bgcolor() is None
+ assert self.vt.fgcolor() is None
+ assert self.vt.bgcolor() is None
- assert not self.vt.default_bold()
- assert not self.vt.default_italic()
- assert not self.vt.default_underline()
- assert not self.vt.default_inverse()
+ assert not self.vt.bold()
+ assert not self.vt.italic()
+ assert not self.vt.underline()
+ assert not self.vt.inverse()
assert not self.vt.hide_cursor()
assert not self.vt.application_keypad()
@@ -47,26 +47,26 @@ class EscapeTest(VT100Test):
self.process("f\033[31m\033[47;1;3;4moo\033[7m\033[21;21H\033]2;window title\007\033]1;window icon name\007\033[?25l\033[?1h\033=\033[?9h\033[?1000h\033[?1002h\033[?1006h\033[?2004h\007\033g")
- row, col = self.vt.cursor_pos()
+ row, col = self.vt.cursor_position()
assert row == 20
assert col == 20
cell = self.vt.cell(0, 0)
assert cell.contents() == "f"
- assert self.vt.get_string_plaintext(0, 0, 500, 500) == 'foo' + ('\n' * 24)
- assert self.vt.get_string_formatted(0, 0, 500, 500) == 'f\033[31;47;1;3;4moo' + ('\n' * 24)
+ assert self.vt.window_contents(0, 0, 500, 500) == 'foo' + ('\n' * 24)
+ assert self.vt.window_contents_formatted(0, 0, 500, 500) == 'f\033[31;47;1;3;4moo' + ('\n' * 24)
assert self.vt.title() == "window title"
assert self.vt.icon_name() == "window icon name"
- assert self.vt.default_fgcolor() == 1
- assert self.vt.default_bgcolor() == 7
+ assert self.vt.fgcolor() == 1
+ assert self.vt.bgcolor() == 7
- assert self.vt.default_bold()
- assert self.vt.default_italic()
- assert self.vt.default_underline()
- assert self.vt.default_inverse()
+ assert self.vt.bold()
+ assert self.vt.italic()
+ assert self.vt.underline()
+ assert self.vt.inverse()
assert self.vt.hide_cursor()
assert self.vt.application_keypad()
@@ -81,27 +81,27 @@ class EscapeTest(VT100Test):
self.process("\033c")
- row, col = self.vt.cursor_pos()
+ row, col = self.vt.cursor_position()
assert row == 0
assert col == 0
cell = self.vt.cell(0, 0)
assert cell.contents() == ""
- assert self.vt.get_string_plaintext(0, 0, 500, 500) == ('\n' * 24)
- assert self.vt.get_string_formatted(0, 0, 500, 500) == ('\n' * 24)
+ assert self.vt.window_contents(0, 0, 500, 500) == ('\n' * 24)
+ assert self.vt.window_contents_formatted(0, 0, 500, 500) == ('\n' * 24)
# title and icon name don't change with reset
assert self.vt.title() == "window title"
assert self.vt.icon_name() == "window icon name"
- assert self.vt.default_fgcolor() is None
- assert self.vt.default_bgcolor() is None
+ assert self.vt.fgcolor() is None
+ assert self.vt.bgcolor() is None
- assert not self.vt.default_bold()
- assert not self.vt.default_italic()
- assert not self.vt.default_underline()
- assert not self.vt.default_inverse()
+ assert not self.vt.bold()
+ assert not self.vt.italic()
+ assert not self.vt.underline()
+ assert not self.vt.inverse()
assert not self.vt.hide_cursor()
assert not self.vt.application_keypad()
@@ -122,4 +122,4 @@ class EscapeTest(VT100Test):
def test_decsc(self):
self.process("foo\0337\r\n\r\n\r\n bar\0338baz")
- assert self.vt.get_string_plaintext(0, 0, 23, 79) == 'foobaz\n\n\n bar' + ('\n' * 21)
+ assert self.vt.window_contents(0, 0, 23, 79) == 'foobaz\n\n\n bar' + ('\n' * 21)