mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
perl: tests
This commit is contained in:
parent
fedc37d079
commit
ea36ef3107
1 changed files with 2 additions and 4 deletions
|
|
@ -2,16 +2,14 @@ use strict;
|
|||
use Test::More;
|
||||
use Data::MessagePack;
|
||||
|
||||
foreach my $data("abc") {
|
||||
foreach my $data("abc", [42]) {
|
||||
my $packed = Data::MessagePack->pack($data);
|
||||
|
||||
my $unpacker = Data::MessagePack::Unpacker->new;
|
||||
note "buff: ", join " ", map { unpack 'H2', $_ } split //, $packed;
|
||||
|
||||
my $offset = 0;
|
||||
foreach my $byte(split //, $packed) {
|
||||
note "offset: $offset";
|
||||
$offset += $unpacker->execute($byte);
|
||||
$unpacker->execute($byte);
|
||||
}
|
||||
|
||||
ok $unpacker->is_finished, 'finished';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue