1
0
forked from me/IronOS

Change font table in Python to use bytes literals

This commit is contained in:
Alvin Wong
2021-04-15 14:32:09 +08:00
parent 4f28b3d48a
commit e601b762b0
3 changed files with 848 additions and 836 deletions

View File

@@ -24,6 +24,12 @@ class TestMakeTranslation(unittest.TestCase):
self.assertEqual(bytes_to_escaped(b"\x00"), "\\x00")
self.assertEqual(bytes_to_escaped(b"\xF1\xAB"), "\\xF1\\xAB")
def test_bytes_to_c_hex(self):
from make_translation import bytes_to_c_hex
self.assertEqual(bytes_to_c_hex(b"\x00"), "0x00,")
self.assertEqual(bytes_to_c_hex(b"\xF1\xAB"), "0xF1, 0xAB,")
if __name__ == "__main__":
unittest.main()