tests/extmod: Get DecompIO test running on low-memory targets.

By changing the zlib header so that it uses a small (256 byte) window.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-02-09 15:20:25 +11:00
parent 5c3c1c737e
commit b1123a54c1
1 changed files with 3 additions and 3 deletions

View File

@ -20,13 +20,13 @@ print(inp.read())
print(buf.seek(0, 1))
# zlib bitstream
inp = zlib.DecompIO(io.BytesIO(b"x\x9c30\xa0=\x00\x00\xb3q\x12\xc1"))
# zlib bitstream (with 256 byte window size)
inp = zlib.DecompIO(io.BytesIO(b"\x08\x9930\xa0=\x00\x00\xb3q\x12\xc1"))
print(inp.read(10))
print(inp.read())
# zlib bitstream, wrong checksum
inp = zlib.DecompIO(io.BytesIO(b"x\x9c30\xa0=\x00\x00\xb3q\x12\xc0"))
inp = zlib.DecompIO(io.BytesIO(b"\x08\x9930\xa0=\x00\x00\xb3q\x12\xc0"))
try:
print(inp.read())
except OSError as e: