Net-DAAP-DMAP

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

my @dmap_files;
BEGIN { @dmap_files = <t/*.dmap> }
use Test::More tests => scalar @dmap_files;
use Net::DAAP::DMAP qw( dmap_unpack dmap_pack );

sub is_binary ($$;$) {
    $_[0] =~ s{([^[:print:]])}{sprintf "<%02x>", ord $1}ge;
    $_[1] =~ s{([^[:print:]])}{sprintf "<%02x>", ord $1}ge;
    goto &is;
}
if ( eval "use Data::HexDump; use Test::Differences; 1" ) {
    no warnings 'redefine';
    *is_binary = sub ($$;$) {
        my ( $value, $expected, $reason ) = @_;
        eq_or_diff( HexDump($value), HexDump($expected), $reason );
    };
}

for my $file (@dmap_files) {
    local $TODO = "Fix Net::DAAP::DMAP to understand the new content codes"
        if $file =~ /server-info/;



( run in 0.346 second using v1.01-cache-2.11-cpan-131fc08a04b )