More tests

This commit is contained in:
gfx
2010-09-19 15:47:32 +09:00
parent afefbe4e56
commit 7f42ed86f2
2 changed files with 11 additions and 2 deletions

View File

@@ -5,13 +5,14 @@ no warnings 'uninitialized'; # i need this. i need this.
sub unpackit {
my $v = $_[0];
$v =~ s/ //g;
$v =~ s/ +//g;
$v = pack 'H*', $v;
return Data::MessagePack->unpack($v);
}
sub pis ($$) {
is_deeply unpackit($_[0]), $_[1], 'dump ' . $_[0];
is_deeply unpackit($_[0]), $_[1], 'dump ' . $_[0]
or diag( explain(unpackit($_[0])) );
}
my @dat = do 't/data.pl';