aboutsummaryrefslogtreecommitdiffstats
path: root/t/init_test.py
blob: c4b8b48df05c3f38b4f20ce74f800ee4bf9d9471 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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() == ""

        assert self.vt.default_fgcolor() is None
        assert self.vt.default_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.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()