Currently zx __test file.rzx only runs the RZX playback. The .z80 test also verifies binary roundtripping (match(image, file.encode())).
To support the same for RZX:
- Add
RZXFile.encode() that calls make_rzx(self.chunks).
- Add re-compression support in
make_rzx() for snapshot chunks that were originally compressed (currently we decompress on load and re-encode uncompressed, so byte-exact comparison fails for compressed files).
- Update
test_file() to call match(image, file.encode()) for RZXFile the same way it does for MachineSnapshot.
Currently
zx __test file.rzxonly runs the RZX playback. The.z80test also verifies binary roundtripping (match(image, file.encode())).To support the same for RZX:
RZXFile.encode()that callsmake_rzx(self.chunks).make_rzx()for snapshot chunks that were originally compressed (currently we decompress on load and re-encode uncompressed, so byte-exact comparison fails for compressed files).test_file()to callmatch(image, file.encode())forRZXFilethe same way it does forMachineSnapshot.