mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-16 15:01:14 +02:00
perl: added more test case for streaming deserializer.
This commit is contained in:
parent
e57084f6df
commit
70d2c47367
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user