mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
Start work on supporting changing of entries in the color table
This commit is contained in:
@@ -273,8 +273,8 @@ class TestDataTypes(BaseTest):
|
||||
c.update_ansi_color_table(build_ansi_color_table())
|
||||
for i in range(8):
|
||||
col = getattr(defaults, 'color{}'.format(i))
|
||||
self.assertEqual(c.ansi_color(30 + i), col[0] << 16 | col[1] << 8 | col[2])
|
||||
self.ae(c.color_256(255), 0xeeeeee)
|
||||
self.assertEqual(c.as_color(i << 8 | 1), (col[0], col[1], col[2]))
|
||||
self.ae(c.as_color(255 << 8 | 1), (0xee, 0xee, 0xee))
|
||||
|
||||
def test_sprite_map(self):
|
||||
s = SpriteMap(10, 2)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user