]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl -wT | |
2 | use v5.14; | |
3 | use warnings; | |
4 | ||
5 | use Test::More tests => 37; | |
6 | ||
7 | use Storable qw/thaw/; | |
8 | ||
9 | BEGIN { use_ok('App::MusicExpo'); } | |
10 | ||
11 | my $flacinfo = thaw App::MusicExpo::flacinfo 'empty.flac'; | |
12 | my $mp3info = thaw App::MusicExpo::mp3info 'empty.mp3'; | |
13 | my $vorbisinfo = thaw App::MusicExpo::vorbisinfo 'empty.ogg'; | |
14 | my $mp4info = thaw App::MusicExpo::mp4info 'empty.aac'; | |
15 | ||
16 | is $flacinfo->{format}, 'FLAC', 'flacinfo format'; | |
17 | is $flacinfo->{title}, 'Cellule', 'flacinfo title'; | |
18 | is $flacinfo->{artist}, 'Silence', 'flacinfo artist'; | |
19 | is $flacinfo->{year}, 2005, 'flacinfo year'; | |
20 | is $flacinfo->{album}, 'L\'autre endroit', 'flacinfo album'; | |
21 | is $flacinfo->{tracknumber}, '01', 'flacinfo tracknumber'; | |
22 | is $flacinfo->{tracktotal}, '09', 'flacinfo tracktotal'; | |
23 | is $flacinfo->{genre}, 'Electro', 'flacinfo genre'; | |
24 | is $flacinfo->{file}, 'empty.flac', 'flacinfo path'; | |
25 | ||
26 | is $mp3info->{format}, 'MP3', 'mp3info format'; | |
27 | is $mp3info->{title}, 'Cellule', 'mp3info title'; | |
28 | is $mp3info->{artist}, 'Silence', 'mp3info artist'; | |
29 | is $mp3info->{year}, 2005, 'mp3info year'; | |
30 | is $mp3info->{album}, 'L\'autre endroit', 'mp3info album'; | |
31 | is $mp3info->{tracknumber}, '01', 'mp3info tracknumber'; | |
32 | is $mp3info->{tracktotal}, '09', 'mp3info tracktotal'; | |
33 | is $mp3info->{genre}, 'Electro', 'mp3info genre'; | |
34 | is $mp3info->{file}, 'empty.mp3', 'mp3info path'; | |
35 | ||
36 | is $vorbisinfo->{format}, 'Vorbis', 'vorbisinfo format'; | |
37 | is $vorbisinfo->{title}, 'Cellule', 'vorbisinfo title'; | |
38 | is $vorbisinfo->{artist}, 'Silence', 'vorbisinfo artist'; | |
39 | is $vorbisinfo->{year}, 2005, 'vorbisinfo year'; | |
40 | is $vorbisinfo->{album}, 'L\'autre endroit', 'vorbisinfo album'; | |
41 | is $vorbisinfo->{tracknumber}, '01', 'vorbisinfo tracknumber'; | |
42 | is $vorbisinfo->{tracktotal}, '09', 'vorbisinfo tracktotal'; | |
43 | is $vorbisinfo->{genre}, 'Electro', 'vorbisinfo genre'; | |
44 | is $vorbisinfo->{file}, 'empty.ogg', 'vorbisinfo path'; | |
45 | ||
46 | is $mp4info->{format}, 'AAC', 'mp4info format'; | |
47 | is $mp4info->{title}, 'Cellule', 'mp4info title'; | |
48 | is $mp4info->{artist}, 'Silence', 'mp4info artist'; | |
49 | is $mp4info->{year}, 2005, 'mp4info year'; | |
50 | is $mp4info->{album}, 'L\'autre endroit', 'mp4info album'; | |
51 | is $mp4info->{tracknumber}, '1', 'mp4info tracknumber'; | |
52 | is $mp4info->{tracktotal}, '9', 'mp4info tracktotal'; | |
53 | is $mp4info->{genre}, 'Electro', 'mp4info genre'; | |
54 | is $mp4info->{file}, 'empty.aac', 'mp4info path'; |