Parent Directory | Revision Log
refactor Frey::Boostrap from Frey::Server to have correct warn handling - we now use File::Tee to capture STDERR to file and display that (with filtering) for display - added FREY_NO_LOG enviroment variable to disable logging (for perl -c) - move all warnings handling into Frey::Web->warnings_html - make Frey->debug Int (this touched a bunch of tests)
1 | #!/usr/bin/perl |
2 | use strict; |
3 | use warnings; |
4 | |
5 | my $debug = @ARGV ? 1 : 0; |
6 | |
7 | use Test::More tests => 7; |
8 | use lib 'lib'; |
9 | |
10 | use Data::Dump qw/dump/; |
11 | |
12 | BEGIN { |
13 | use_ok('Frey::Web::Links'); |
14 | use_ok('Strix::User'); |
15 | } |
16 | |
17 | ok( my $u = Frey::Web::Links->new( |
18 | name => 'foo', |
19 | current => 3, |
20 | values => [ 1 .. 5 ], |
21 | delimiter => '!', |
22 | ), 'new' ); |
23 | |
24 | diag dump( $u ) if $debug; |
25 | |
26 | ok( my $h = $u->links, 'links' ); |
27 | diag $h if $debug; |
28 | |
29 | cmp_ok( $h, 'eq', |
30 | '<a href="?foo=1">1</a>!<a href="?foo=2">2</a>!<em>3</em>!<a href="?foo=4">4</a>!<a href="?foo=5">5</a>' |
31 | , 'markup' ); |
32 | |
33 | ok( my @l = $u->links, 'links as array' ); |
34 | cmp_ok( scalar @l, '==', 5, '5 links' ); |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |