--- trunk/t/02-frey-web.t 2008/11/19 02:52:42 444 +++ trunk/t/02-frey-web.t 2008/11/26 07:57:12 532 @@ -2,12 +2,12 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More tests => 25; use lib 'lib'; use Data::Dump qw/dump/; -my $debug = 1 if @ARGV; +my $debug = @ARGV ? 0 : 1; BEGIN { use_ok('Frey::Web'); @@ -35,7 +35,7 @@ diag dump( @head ) if $debug; ok( $o->add_head( '/static/introspect.css' ), 'add_head css' ); -ok( $o->add_head( '' ), 'add_head html' ); +ok( $o->add_head( "" ), 'add_head html' ); ok( my $html = $o->page( title => 'Test', body => '' ), 'page' ); diag $html if $debug; @@ -43,6 +43,7 @@ like( $html, qr{text/javascript.*\.js}, 'have js' ); like( $html, qr{text/css.*\.css}, 'have css' ); like( $html, qr{head html}, 'have html' ); +like( $html, qr{icon}, 'have icon' ); html_ok( $html, 'html lint' ); @@ -60,3 +61,9 @@ like( $html2, qr{frey\.css}, 'have css' ); like( $html2, qr{ext}, 'have js' ); + +ok( my $error = $o->error('test,ignore'), 'error' ); +diag $error if $debug; +like( $error, qr{test,ignore.*$0}s, "have $0" ); + +ok( $o->dump_max_bytes, 'dump_max_bytes' );