]>
Commit | Line | Data |
---|---|---|
8086953c | 1 | #!/usr/bin/perl -wT |
23867054 MG |
2 | use v5.14; |
3 | use warnings; | |
4 | ||
5 | use Test::More tests => 3; | |
6 | ||
7 | use File::Temp qw/tempfile/; | |
23867054 MG |
8 | |
9 | my $file; | |
10 | ||
11 | BEGIN { | |
12 | $file = (tempfile UNLINK => 1)[1]; | |
a535e879 | 13 | @ARGV = (-cache => $file, sort <empty*>); |
23867054 MG |
14 | } |
15 | BEGIN { use_ok('App::MusicExpo'); } | |
16 | ||
17 | close STDOUT; | |
18 | my $out; | |
19 | open STDOUT, '>', \$out; | |
20 | ||
21 | App::MusicExpo->run; | |
22 | ||
23 | is $out, <<'OUT', 'output is correct'; | |
24 | <!DOCTYPE html> | |
25 | <title>Music</title> | |
26 | <meta charset="utf-8"> | |
6b125df7 | 27 | <link rel="stylesheet" href="musicexpo.css"> |
1fc49a0c MG |
28 | <script async defer type="application/javascript" src="player.js"></script> |
29 | ||
30 | <div id="player"></div> | |
23867054 MG |
31 | |
32 | <table border> | |
33 | <thead> | |
34 | <tr><th>Title<th>Artist<th>Album<th>Genre<th>Track<th>Year<th>Type | |
35 | <tbody> | |
a535e879 MG |
36 | <tr><td class="title"><a href="#silence-cellule" data-hash="#silence-cellule">Cellule</a><td class="artist">Silence<td class="album">L'autre endroit<td class="genre">Electro<td class="track">01/09<td class="year">2005<td class="formats"><a href="/music/empty.flac">FLAC</a> <a href="/music/empty.ogg">Vorbis</a> |
37 | <tr><td class="title"><a href="#silence-cellule" data-hash="#silence-cellule">Cellule</a><td class="artist">Silence<td class="album">L'autre endroit<td class="genre">Electro<td class="track">01/09<td class="year">2005<td class="formats"><a href="/music/empty3.mp3">MP3</a> | |
38 | <tr><td class="title"><a href="#silence-cellule" data-hash="#silence-cellule">Cellule</a><td class="artist">Silence<td class="album">L'autre endroit<td class="genre">Electro<td class="track">1/9<td class="year">2005<td class="formats"><a href="/music/empty4.aac">AAC</a> | |
23867054 MG |
39 | </table> |
40 | OUT | |
41 | ||
42 | ok -e $file, 'cache exists'; |