3 use_ok 'SL::HTML::Util';
6 is(SL::HTML::Util::strip($_[0]), $_[1], "$_[2] (direct invocation)");
7 is(SL::HTML::Util->strip($_[0]), $_[1], "$_[2] (class invocation)");
10 test undef, '', 'undef';
12 test '0 but true', '0 but true', 'zero but true';
13 test '<h1>title</h1>', 'title', 'standard case';
14 test '<h1>title</h2>', 'title', 'imbalanced html';
15 test 'walter & walter', 'walter & walter', 'known entities';
16 test 'Walter&Walter; Chicago', 'Walter&Walter; Chicago', 'unknown entities';
17 test '<h1>title</h1', 'title', 'invalid html 1';
19 # This happens when someone copies a block from MS Word. The HTML that is
20 # generated contains style information in comments. These styles can contain
21 # sgml. HTML::Parser does not handle these properly.
22 test '<!-- style: <> -->title', 'title', 'nested stuff in html comments';