line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::Plugin::HTMLFilters::t::Basic; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
784
|
$Mason::Plugin::HTMLFilters::t::Basic::VERSION = '0.03'; |
4
|
|
|
|
|
|
|
} |
5
|
1
|
|
|
1
|
|
1339
|
use Test::Class::Most parent => 'Mason::Test::Class'; |
|
1
|
|
|
|
|
114677
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub test_html_filters : Test(5) { |
8
|
|
|
|
|
|
|
my $self = shift; |
9
|
|
|
|
|
|
|
$self->setup_interp( plugins => [ '@Default', 'HTMLFilters' ] ); |
10
|
|
|
|
|
|
|
$self->test_comp( src => '<% "<a>" | HTML %>', expect => '<a>' ); |
11
|
|
|
|
|
|
|
$self->test_comp( src => '<% "/foo/bar?a=5" | URI %>', expect => '%2Ffoo%2Fbar%3Fa%3D5' ); |
12
|
|
|
|
|
|
|
$self->test_comp( |
13
|
|
|
|
|
|
|
src => '<% "First\n\nSecond\n\nThird\n\n" | HTMLPara %>', |
14
|
|
|
|
|
|
|
expect => "<p>\nFirst\n</p>\n\n<p>\nSecond\n</p>\n\n<p>\nThird</p>\n" |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
$self->test_comp( |
17
|
|
|
|
|
|
|
src => '<% "First\n\nSecond\n\nThird\n\n" | NoBlankLines,HTMLPara %>', |
18
|
|
|
|
|
|
|
expect => "<p>\nFirst\n</p>\n<p>\nSecond\n</p>\n<p>\nThird</p>\n" |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
$self->test_comp( |
21
|
|
|
|
|
|
|
src => '<% "First\n\nSecond\n\nThird\n\n" | HTMLParaBreak %>', |
22
|
|
|
|
|
|
|
expect => "First\n<br />\n<br />\nSecond\n<br />\n<br />\nThird\n<br />\n<br />\n", |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |