2 #use warnings FATAL => 'all';
8 is( HTML::Zoom->from_html('<div id="yo"></div>')
10 ->replace_content('grg')
12 '<div id="yo">grg</div>',
16 is( HTML::Zoom->from_html('<div class="yo"></div>')
18 ->replace_content('grg')
20 '<div class="yo">grg</div>',
24 is( HTML::Zoom->from_html('<div frew="yo"></div>')
26 ->replace_content('grg')
28 '<div frew="yo">grg</div>',
32 is( HTML::Zoom->from_html('<div frew="yo"></div>')
33 ->select('div[frew="yo"]')
34 ->replace_content('grg')
36 '<div frew="yo">grg</div>',
37 'E[attr="val"] works' );
40 is( HTML::Zoom->from_html('<div f="frew goog"></div>')
41 ->select('div[f*="oo"]')
42 ->replace_content('grg')
44 '<div f="frew goog">grg</div>',
45 'E[attr*="val"] works' );
48 is( HTML::Zoom->from_html('<div f="foobar"></div>')
49 ->select('div[f^="foo"]')
50 ->replace_content('grg')
52 '<div f="foobar">grg</div>',
53 'E[attr^="val"] works' );
56 is( HTML::Zoom->from_html('<div f="foobar"></div>')
57 ->select('div[f$="bar"]')
58 ->replace_content('grg')
60 '<div f="foobar">grg</div>',
61 'E[attr$="val"] works' );
64 is( HTML::Zoom->from_html('<div f="foo bar"></div>')
65 ->select('div[f*="bar"]')
66 ->replace_content('grg')
68 '<div f="foo bar">grg</div>',
69 'E[attr*="val"] works' );
72 is( HTML::Zoom->from_html('<table><tr></tr><tr></tr></table>')
74 ->replace_content(\'<td></td>')
76 '<table><tr><td></td></tr><tr><td></td></tr></table>',
81 is( HTML::Zoom->from_html('<table><tr><td></td></tr><tr><td></td></tr></table>')
82 ->select('table tr td')
83 ->replace_content('frew')
85 '<table><tr><td>frew</td></tr><tr><td>frew</td></tr></table>',
86 'sel1 sel2 sel3 works' );