X-Git-Url: http://git.ieval.ro/?p=app-musicexpo.git;a=blobdiff_plain;f=t%2Fmusicexpo-cache.t;h=b703b7a035608cf81cd24fb0ed017cc46b1f3914;hp=47e07c9069d1ce93beb9eb31c624120a9dfb317c;hb=f7964165707b3e45f93960236a695596fa62bcd1;hpb=17c8e5f607f576c8762858da54c8663e7d9bd7d0 diff --git a/t/musicexpo-cache.t b/t/musicexpo-cache.t index 47e07c9..b703b7a 100644 --- a/t/musicexpo-cache.t +++ b/t/musicexpo-cache.t @@ -18,9 +18,28 @@ close STDOUT; my $out; open STDOUT, '>', \$out; +my %handled = map { $_ => 1 } App::MusicExpo::extensions_handled; + +my $prefix = 'CelluleSilenceL'autre endroitElectro01/092005'; + +my @lines; +if ($handled{'.flac'} && $handled{'.ogg'}) { + push @lines, $prefix . 'FLAC Vorbis ' +} elsif ($handled{'.flac'}) { + push @lines, $prefix . 'FLAC ' +} elsif ($handled{'.ogg'}) { + push @lines, $prefix . 'Vorbis ' +} + +push @lines, $prefix . 'Opus ' if $handled{'.opus'}; +push @lines, $prefix . 'MP3 ' if $handled{'.mp3'}; +push @lines, 'L'autre endroitElectro1/92005AAC ' if $handled{'.aac'}; + +my $contents = join "\n", @lines; + App::MusicExpo->run; -is $out, <<'OUT', 'output is correct'; +is $out, <<"OUT", 'output is correct'; Music @@ -32,11 +51,7 @@ is $out, <<'OUT', 'output is correct'; -$contents
TitleArtistAlbumGenreTrackYearType -
CelluleSilenceL'autre endroitElectro01/092005FLAC Vorbis -
CelluleSilenceL'autre endroitElectro01/092005Opus -
CelluleSilenceL'autre endroitElectro01/092005MP3 -
CelluleSilenceL'autre endroitElectro1/92005AAC +
OUT