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

@@ -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)