diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-22 12:03:40 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-22 12:03:40 -0400 |
commit | a5373c51b951d50e6cab35458c8556d9cc865641 (patch) | |
tree | 0f6206ad8da68d646235c43fd8e1d5faa85441d6 /t | |
parent | 83f098f45410a4e3fb4fe5953e77a8392d0e2bf5 (diff) | |
download | libvt100-python-a5373c51b951d50e6cab35458c8556d9cc865641.tar.gz libvt100-python-a5373c51b951d50e6cab35458c8556d9cc865641.zip |
expose a method for checking if the alternate buffer is active
Diffstat (limited to 't')
-rw-r--r-- | t/mode_test.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/mode_test.py b/t/mode_test.py index 7332b1e..352ee7f 100644 --- a/t/mode_test.py +++ b/t/mode_test.py @@ -190,9 +190,12 @@ class ModeTest(VT100Test): def test_alternate_buffer(self): self.process("\033[m\033[2J\033[H1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n10\r\n11\r\n12\r\n13\r\n14\r\n15\r\n16\r\n17\r\n18\r\n19\r\n20\r\n21\r\n22\r\n23\r\n24") assert self.vt.window_contents() == "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n" + assert not self.vt.alternate_buffer_active() self.process("\033[?1049h") assert self.vt.window_contents() == ('\n' * 24) + assert self.vt.alternate_buffer_active() self.process("foobar") assert self.vt.window_contents() == 'foobar' + ('\n' * 24) self.process("\033[?1049l") assert self.vt.window_contents() == "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n" + assert not self.vt.alternate_buffer_active() |