diff options
author | Bas Westerbaan <bas@westerbaan.name> | 2015-01-26 20:31:03 +0100 |
---|---|---|
committer | Bas Westerbaan <bas@westerbaan.name> | 2015-01-26 20:31:03 +0100 |
commit | 83404945c06baa3124d7e20a2d4e93652ecf90c5 (patch) | |
tree | fedd4b99acaa853daecd879867477b984d858656 | |
parent | 68b029446569bdaf77518ceda99da822b0b26f21 (diff) | |
download | msgpack-python-83404945c06baa3124d7e20a2d4e93652ecf90c5.tar.gz |
Add test for issue #124
-rw-r--r-- | test/test_sequnpack.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index 5d37698..518b905 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -84,3 +84,15 @@ def test_readbytes(): assert unpacker.read_bytes(3) == b'oob' assert unpacker.unpack() == ord(b'a') assert unpacker.unpack() == ord(b'r') + +def test_issue124(): + unpacker = Unpacker() + unpacker.feed('\xa1?\xa1!') + assert tuple(unpacker) == ('?', '!') + assert tuple(unpacker) == () + unpacker.feed("\xa1?\xa1") + assert tuple(unpacker) == ('?',) + assert tuple(unpacker) == () + unpacker.feed("!") + assert tuple(unpacker) == ('!',) + assert tuple(unpacker) == () |