mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
Allow specifying the offset and size for reading data from files
Also require size to be specified for SHM objects to support platforms such as macOS that have no way to get the size from the fd.
This commit is contained in:
@@ -204,7 +204,7 @@ class TestParser(BaseTest):
|
||||
k[p] = v.encode('ascii')
|
||||
for f in 'action transmission_type compressed'.split():
|
||||
k.setdefault(f, b'\0')
|
||||
for f in 'format more id data_sz width height x_offset y_offset data_height data_width num_cells num_lines z_index'.split():
|
||||
for f in 'format more id data_sz data_offset width height x_offset y_offset data_height data_width num_cells num_lines z_index'.split():
|
||||
k.setdefault(f, 0)
|
||||
p = k.pop('payload', '').encode('utf-8')
|
||||
k['payload_sz'] = len(p)
|
||||
|
||||
Reference in New Issue
Block a user