use strict; use Test::More tests => 7; BEGIN { use_ok( "Test::HTML::Content" ); }; SKIP: { skip "XML::XPath or XML::LibXML is needed for title testing", 6 unless $Test::HTML::Content::can_xpath; title_ok('A test title',qr"A test title","Title RE"); title_ok('A test title',qr"^A test title$","Anchored title RE"); title_ok('A test title',qr"test","Title RE works for partial matches"); title_ok('A test title',"A test title","Title string"); no_title('A test title',"test","Complete title string gets compared"); no_title('A test title',"A toast title","no_title string"); };