aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-20 13:09:29 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-20 13:09:29 -0400
commit7142f5c2566976f09236a1f1eb92f8c5fb48ce8d (patch)
tree6415ddcad6ab6e3ba65ff737587ded2bdb58c59a /t
parent94f46f289245504300fbbdb2f882b0e1bc267a84 (diff)
downloadlibvt100-python-7142f5c2566976f09236a1f1eb92f8c5fb48ce8d.tar.gz
libvt100-python-7142f5c2566976f09236a1f1eb92f8c5fb48ce8d.zip
test for initial state
Diffstat (limited to 't')
-rw-r--r--t/init_test.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/t/init_test.py b/t/init_test.py
new file mode 100644
index 0000000..bc8084e
--- /dev/null
+++ b/t/init_test.py
@@ -0,0 +1,46 @@
+from . import VT100Test
+
+class InitTest(VT100Test):
+ def test_init(self):
+ assert self.vt.rows == 24
+ assert self.vt.cols == 80
+
+ row, col = self.vt.cursor_pos()
+ assert row == 0
+ assert col == 0
+
+ cell = self.vt.cell(0, 0)
+ assert cell.contents() == ""
+ cell = self.vt.cell(23, 79)
+ assert cell.contents() == ""
+ cell = self.vt.cell(24, 0)
+ assert cell is None
+ cell = self.vt.cell(0, 80)
+ assert cell is None
+
+ 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.title() == ""
+ assert self.vt.icon_name() == ""
+
+ color = self.vt.default_fgcolor()
+ assert color.color() is None
+ color = self.vt.default_bgcolor()
+ assert color.color() 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.hide_cursor()
+ assert not self.vt.application_keypad()
+ assert not self.vt.application_cursor()
+ assert not self.vt.mouse_reporting_press()
+ assert not self.vt.mouse_reporting_press_release()
+ assert not self.vt.mouse_reporting_button_motion()
+ assert not self.vt.mouse_reporting_sgr_mode()
+ assert not self.vt.bracketed_paste()
+ assert not self.vt.seen_visual_bell()
+ assert not self.vt.seen_audible_bell()