diff options
| author | tokuhirom <tokuhirom@gmail.com> | 2010-05-02 22:09:18 +0900 |
|---|---|---|
| committer | tokuhirom <tokuhirom@gmail.com> | 2010-05-02 22:09:18 +0900 |
| commit | 70d2c47367ca56be99f0b7e7b815171162ff211e (patch) | |
| tree | 8965bc043124e846683524d1731687f633c40969 /perl | |
| parent | e57084f6dfa99e63542952a3fa39b0e75a1e66de (diff) | |
| download | msgpack-python-70d2c47367ca56be99f0b7e7b815171162ff211e.tar.gz | |
perl: added more test case for streaming deserializer.
Diffstat (limited to 'perl')
| -rw-r--r-- | perl/t/03_stream_unpack.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/perl/t/03_stream_unpack.t b/perl/t/03_stream_unpack.t index 0a8d7d9..a4ab4eb 100644 --- a/perl/t/03_stream_unpack.t +++ b/perl/t/03_stream_unpack.t @@ -23,10 +23,21 @@ sub pis ($$) { my @dat = do 't/data.pl'; -plan tests => 1*(scalar(@dat)/2) + 1; +plan tests => 1*(scalar(@dat)/2) + 3; isa_ok $up, 'Data::MessagePack::Unpacker'; for (my $i=0; $i<scalar(@dat); ) { pis $dat[$i++], $dat[$i++]; } +# devided. +{ + my $up = Data::MessagePack::Unpacker->new(); + $up->execute("\x95", 0); # array marker + for (1..5) { + $up->execute("\xc0", 0); # nil + } + ok $up->is_finished; + is_deeply $up->data, [undef, undef, undef, undef, undef]; +} + |
