2 |
use strict; |
use strict; |
3 |
use warnings; |
use warnings; |
4 |
|
|
5 |
use Test::More tests => 29; |
use Test::More tests => 31; |
6 |
use lib 'lib'; |
use lib 'lib'; |
7 |
|
|
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
41 |
|
|
42 |
html_ok( $o->warnings_html, 'warnings_html' ); |
html_ok( $o->warnings_html, 'warnings_html' ); |
43 |
|
|
44 |
ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' ); |
ok( my $html = $o->html_page( title => 'Test', body => '<!-- in-body -->' ), 'page' ); |
45 |
diag $html if $debug; |
diag $html if $debug; |
46 |
|
|
47 |
like( $html, qr{text/javascript.*\.js}, 'have js' ); |
like( $html, qr{text/javascript.*\.js}, 'have js' ); |
59 |
|
|
60 |
ok( $o->title, 'has title' ); |
ok( $o->title, 'has title' ); |
61 |
|
|
62 |
ok( my $html2 = $o->page( title => 'Test2', body => '<!-- in-body 2 -->' ), 'page' ); |
ok( my $html2 = $o->html_page( title => 'Test2', body => '<!-- in-body 2 -->' ), 'page' ); |
63 |
diag $html2 if $debug; |
diag $html2 if $debug; |
64 |
|
|
65 |
cmp_ok( length( $html ), '<', length( $html2 ), 'bigger html' ); |
cmp_ok( length( $html ), '<', length( $html2 ), 'bigger html' ); |
73 |
|
|
74 |
ok( $o->dump_max_bytes, 'dump_max_bytes' ); |
ok( $o->dump_max_bytes, 'dump_max_bytes' ); |
75 |
|
|
76 |
|
ok( $html = $o->html_self, 'html_self' ); |
77 |
|
diag $html if $debug; |
78 |
|
like( $html, qr{=HASH}s, "have self" ); |
79 |
|
|
80 |
|
|