diff options
| author | INADA Naoki <methane@users.noreply.github.com> | 2015-01-27 14:03:30 +0900 |
|---|---|---|
| committer | INADA Naoki <methane@users.noreply.github.com> | 2015-01-27 14:03:30 +0900 |
| commit | 3f5e0582648b04c2b3e6663ed946462b3d7df02e (patch) | |
| tree | c0f3accad86450b0d2e2c2844d9d31f3081dae92 /test | |
| parent | 68b029446569bdaf77518ceda99da822b0b26f21 (diff) | |
| parent | c5d621853d305418feb3ef2616a05f5eb12440bb (diff) | |
| download | msgpack-python-3f5e0582648b04c2b3e6663ed946462b3d7df02e.tar.gz | |
Merge pull request #125 from bwesterb/master
Rollback to correct position in the case of OutOfData.
Fixes #124
Diffstat (limited to 'test')
| -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..45f4cc7 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(b'\xa1?\xa1!') + assert tuple(unpacker) == (b'?', b'!') + assert tuple(unpacker) == () + unpacker.feed(b"\xa1?\xa1") + assert tuple(unpacker) == (b'?',) + assert tuple(unpacker) == () + unpacker.feed(b"!") + assert tuple(unpacker) == (b'!',) + assert tuple(unpacker) == () |
