/[Frey]/trunk/t/03-Frey-IconBrowser.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/t/03-Frey-IconBrowser.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 972 - (show annotations)
Fri Jan 9 19:33:26 2009 UTC (15 years, 3 months ago) by dpavlin
File MIME type: application/x-troff
File size: 935 byte(s)
draw class includes and refactor parts of code
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = @ARGV ? 1 : 0;
6
7 use Test::More tests => 4;
8 use lib 'lib';
9
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok('Frey::IconBrowser');
14 }
15
16 ok( my $o = Frey::IconBrowser->new( debug => $debug ), 'new' );
17 diag dump( $o ) if $debug;
18
19 my @icons = map { "static/icons/$_" } ( qw{
20 Frey.png
21 Frey/Introspect.png
22 Frey/INC.png
23 Frey/SVK.png
24 Frey/Class/Browser.png
25 Frey/Class/Loader.png
26 Frey/Session.png
27 Frey/PPI.png
28 Frey/Test/Runner.png
29 Frey/Test/Runner/failed.png
30 Frey/Test/Runner/passed.png
31 Frey/Test/Mock.png
32 Frey/Run.png
33 Frey/VCI.png
34 Frey/Web.png
35 } );
36
37 diag dump( @icons ) if $debug;
38
39 ok( my ($path,$styles) = $o->combine_images( @icons ), 'combine_images' );
40 diag $path, dump( $styles ) if $debug;
41
42 ok( my $markup = $o->as_markup, 'as_markup' );
43
44 my $html_path = 'var/t/' . ref($o) . '.html';
45 $markup =~ s{/var/}{../}sg;
46 $o->store( $html_path, $markup );
47 diag "created $html_path ", -s $html_path;
48

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26