]>
iEval git - app-musicexpo.git/blob - t/musicexpo-cache.t
5 use Test
::More tests
=> 3;
7 use File
::Temp qw
/tempfile/;
14 $file = (tempfile UNLINK
=> 1)[1];
15 @ARGV = (-cache
=> $file, 'empty.flac', 'empty.mp3');
17 BEGIN { use_ok
('App::MusicExpo'); }
21 open STDOUT
, '>', \
$out;
25 is
$out, <<'OUT', 'output is correct';
28 <meta charset="utf-8">
29 <link rel="stylesheet" href="/music.css">
30 <script async defer type="application/javascript" src="player.js"></script>
32 <div id="player"></div>
36 <tr><th>Title<th>Artist<th>Album<th>Genre<th>Track<th>Year<th>Type
38 <tr><td>Cellule<td>Silence<td>L'autre endroit<td>Electro<td>01/09<td>2005<td><a href="/music/empty.flac">FLAC</a> <a href="/music/empty.mp3">MP3</a>
41 <pre id="json" style="display: none">{"files":[{"album":"L'autre endroit","artist":"Silence","formats":[{"file":"empty.flac","format":"FLAC"},{"file":"empty.mp3","format":"MP3"}],"genre":"Electro","title":"Cellule","tracknumber":"01","tracktotal":"09","year":"2005"}],"prefix":"/music/"}</pre>
44 ok
-e
$file, 'cache exists';
45 tie
my %db, DB_File
=> $file;
This page took 0.064507 seconds and 5 git commands to generate.