]>
iEval git - app-musicexpo.git/blob - t/App-MusicExpo.t
ea1c49653d7c29f9edeb0cea2cdefe1abf3b6f0b
5 use Test
::More tests
=> 46;
7 use Scalar
::Util qw
/looks_like_number/;
10 BEGIN { use_ok
('App::MusicExpo'); }
16 album
=> 'L\'autre endroit',
22 my %handled = map { $_ => 1 } App
::MusicExpo
::extensions_handled
;
25 my ($format, $sub, $file) = @_;
26 my ($ext) = $file =~ /(\..+)$/;
30 skip
"Cannot handle $ext files (tag-reading module missing)", 9 unless $handled{$ext};
31 my $info = thaw
$sub->($file);
32 is
$info->{format
}, $format, "$format format";
33 for (sort keys %data) {
34 my $op = looks_like_number
$data{$_} ?
'==' : 'eq';
35 cmp_ok
$info->{$_}, $op, $data{$_}, "$format $_"
37 is
$info->{file
}, $file, "$format file";
41 test FLAC
=> \
&App
::MusicExpo
::flacinfo
, 'empty.flac';
42 test MP3
=> \
&App
::MusicExpo
::mp3info
, 'empty3.mp3';
43 test Vorbis
=> \
&App
::MusicExpo
::vorbisinfo
, 'empty.ogg';
44 test AAC
=> \
&App
::MusicExpo
::mp4info
, 'empty4.aac';
45 test Opus
=> \
&App
::MusicExpo
::opusinfo
, 'empty2.opus';
This page took 0.057122 seconds and 5 git commands to generate.