Start work on supporting changing of entries in the color table

This commit is contained in:
Kovid Goyal
2016-11-24 15:28:52 +05:30
parent c983f002c1
commit 3031d41e72
11 changed files with 53 additions and 99 deletions

View File

@@ -123,14 +123,14 @@ class TestParser(BaseTest):
for attr in 'bold italic reverse strikethrough'.split():
self.assertTrue(getattr(s.cursor, attr))
self.ae(s.cursor.decoration, 1)
self.ae(s.cursor.fg, 34 << 8 | 1)
self.ae(s.cursor.bg, 44 << 8 | 1)
self.ae(s.cursor.fg, 4 << 8 | 1)
self.ae(s.cursor.bg, 4 << 8 | 1)
pb('\033[38;5;1;48;5;7m', ('select_graphic_rendition', 6))
self.ae(s.cursor.fg, 1 << 8 | 2)
self.ae(s.cursor.bg, 7 << 8 | 2)
self.ae(s.cursor.fg, 1 << 8 | 1)
self.ae(s.cursor.bg, 7 << 8 | 1)
pb('\033[38;2;1;2;3;48;2;7;8;9m', ('select_graphic_rendition', 10))
self.ae(s.cursor.fg, 1 << 24 | 2 << 16 | 3 << 8 | 3)
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 3)
self.ae(s.cursor.fg, 1 << 24 | 2 << 16 | 3 << 8 | 2)
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
c = Callbacks()
s.callbacks = c
pb('\033[5n', ('report_device_status', 5, 0))