From: Marius Gavrilescu Date: Sat, 25 Oct 2014 12:00:09 +0000 (+0300) Subject: Add test for AAC X-Git-Tag: 0.004~3 X-Git-Url: http://git.ieval.ro/?p=app-musicexpo.git;a=commitdiff_plain;h=12d4da0a00f8e1843a7b8624c3bf2d2faf0fa70b Add test for AAC --- diff --git a/MANIFEST b/MANIFEST index 6b43953..f2ca44a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -7,6 +7,8 @@ t/musicexpo-cache.t t/musicexpo.t lib/App/MusicExpo.pm musicexpo +empty.aac empty.mp3 empty.flac empty.ogg + diff --git a/empty.aac b/empty.aac new file mode 100644 index 0000000..e8695dc Binary files /dev/null and b/empty.aac differ diff --git a/t/App-MusicExpo.t b/t/App-MusicExpo.t index ca2c37d..6102d11 100644 --- a/t/App-MusicExpo.t +++ b/t/App-MusicExpo.t @@ -2,7 +2,7 @@ use v5.14; use warnings; -use Test::More tests => 28; +use Test::More tests => 37; use Storable qw/thaw/; @@ -11,6 +11,7 @@ BEGIN { use_ok('App::MusicExpo'); } my $flacinfo = thaw App::MusicExpo::flacinfo 'empty.flac'; my $mp3info = thaw App::MusicExpo::mp3info 'empty.mp3'; my $vorbisinfo = thaw App::MusicExpo::vorbisinfo 'empty.ogg'; +my $mp4info = thaw App::MusicExpo::mp4info 'empty.aac'; is $flacinfo->{format}, 'FLAC', 'flacinfo format'; is $flacinfo->{title}, 'Cellule', 'flacinfo title'; @@ -41,3 +42,13 @@ is $vorbisinfo->{tracknumber}, '01', 'vorbisinfo tracknumber'; is $vorbisinfo->{tracktotal}, '09', 'vorbisinfo tracktotal'; is $vorbisinfo->{genre}, 'Electro', 'vorbisinfo genre'; is $vorbisinfo->{file}, 'empty.ogg', 'vorbisinfo path'; + +is $mp4info->{format}, 'AAC', 'mp4info format'; +is $mp4info->{title}, 'Cellule', 'mp4info title'; +is $mp4info->{artist}, 'Silence', 'mp4info artist'; +is $mp4info->{year}, 2005, 'mp4info year'; +is $mp4info->{album}, 'L\'autre endroit', 'mp4info album'; +is $mp4info->{tracknumber}, '1', 'mp4info tracknumber'; +is $mp4info->{tracktotal}, '9', 'mp4info tracktotal'; +is $mp4info->{genre}, 'Electro', 'mp4info genre'; +is $mp4info->{file}, 'empty.aac', 'mp4info path';