Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 990b24b0bd
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (25 sloc) 0.615 kB
use strict;
use warnings;
use Test::More 0.88;
use HTML::Builder qw{ div p attr };
is
eval "div { }",
q{<div></div>},
'no attributes';
is
eval "div { id gets 'xx' }",
q{<div id="xx"></div>},
'one attribute, gets';
is
eval "div { attr { id => 'xx'}; }",
q{<div id="xx"></div>},
'one attribute, attr';
is
eval "div { attr { id => 'xx', foo => 'bar' }; }",
q{<div foo="bar" id="xx"></div>},
'two attributes, attr';
is
eval "div { attr { id => 'xx' }; foo gets 'bar' }",
q{<div foo="bar" id="xx"></div>},
'two attributes, attr and gets';
done_testing;
Jump to Line
Something went wrong with that request. Please try again.