diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-21 19:57:35 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-21 19:57:35 -0400 |
commit | 57344150841b262f565fa67740028e0517f48598 (patch) | |
tree | ce195d5f89644aed3426ddbaf3d8e7d393186708 /t | |
parent | 5a1666a413466a42f5f3835120e38dad0337869b (diff) | |
download | libvt100-python-57344150841b262f565fa67740028e0517f48598.tar.gz libvt100-python-57344150841b262f565fa67740028e0517f48598.zip |
test for mode setting
Diffstat (limited to 't')
-rw-r--r-- | t/mode_test.py | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/t/mode_test.py b/t/mode_test.py new file mode 100644 index 0000000..cfc50cb --- /dev/null +++ b/t/mode_test.py @@ -0,0 +1,188 @@ +from . import VT100Test + +class ModeTest(VT100Test): + def test_modes(self): + 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() + + self.process("\033[?1h") + + assert not self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert 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() + + self.process("\033[?9h") + + assert not self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert 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() + + self.process("\033[?25l") + + assert self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert 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() + + self.process("\033[?1000h") + + assert self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert 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() + + self.process("\033[?1002h") + + assert self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert not self.vt.mouse_reporting_sgr_mode() + assert not self.vt.bracketed_paste() + + self.process("\033[?1006h") + + assert self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert not self.vt.bracketed_paste() + + self.process("\033[?2004h") + + assert self.vt.hide_cursor() + assert not self.vt.application_keypad() + assert self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033=") + + assert self.vt.hide_cursor() + assert self.vt.application_keypad() + assert self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?1l") + + assert self.vt.hide_cursor() + assert self.vt.application_keypad() + assert not self.vt.application_cursor() + assert self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?9l") + + assert self.vt.hide_cursor() + assert self.vt.application_keypad() + assert not self.vt.application_cursor() + assert not self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?25h") + + assert not self.vt.hide_cursor() + assert self.vt.application_keypad() + assert not self.vt.application_cursor() + assert not self.vt.mouse_reporting_press() + assert self.vt.mouse_reporting_press_release() + assert self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?1000l") + + assert not self.vt.hide_cursor() + assert 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 self.vt.mouse_reporting_button_motion() + assert self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?1002l") + + assert not self.vt.hide_cursor() + assert 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 self.vt.mouse_reporting_sgr_mode() + assert self.vt.bracketed_paste() + + self.process("\033[?1006l") + + assert not self.vt.hide_cursor() + assert 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 self.vt.bracketed_paste() + + self.process("\033[?2004l") + + assert not self.vt.hide_cursor() + assert 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() + + self.process("\033>") + + 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() |