Implement round tripping of SGR blink (5/25)

This commit is contained in:
Kovid Goyal
2025-08-25 12:34:38 +05:30
parent 5a3e9a5567
commit 24049a1a5a
9 changed files with 31 additions and 8 deletions

View File

@@ -112,7 +112,6 @@ class TestScreen(BaseTest):
ln = s.line(0)
self.ae(txt, ln.as_ansi())
def test_rep(self):
s = self.create_screen()
s.draw('a')
@@ -618,11 +617,13 @@ class TestScreen(BaseTest):
def test_sgr(self):
s = self.create_screen()
s.select_graphic_rendition(0, 1, 37, 42)
s.select_graphic_rendition(0, 1, 5, 37, 42)
s.draw('a')
c = s.line(0).cursor_from(0)
self.assertTrue(c.bold)
self.assertTrue(c.blink)
self.ae(c.bg, (2 << 8) | 1)
self.ae('\x1b[22;1;5;37;42ma', s.line(0).as_ansi())
s.cursor_position(2, 1)
s.select_graphic_rendition(0, 35)
s.draw('b')