From: Jakub Narebski Date: Sun, 9 Jan 2011 12:44:11 +0000 (+0100) Subject: Turn pod-ed out failing tests in t/selector.t into todo tests X-Git-Tag: release_0.009004~9^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=commitdiff_plain;h=8c9ef555e2320515b20ac191100c9b13fc0863ee Turn pod-ed out failing tests in t/selector.t into todo tests Descendant selectors ('elem1 elem2') doesn't work yet. The code was "commented out"; turn it into TODO tests, taking into account the fact that HTML::Zoom::SelectorBuilder dies on selectors it doesn't support. While at if fix typo in failing test. --- diff --git a/t/selectors.t b/t/selectors.t index 13a8154..6dd32bd 100644 --- a/t/selectors.t +++ b/t/selectors.t @@ -115,33 +115,32 @@ eval{ like( $@, qr/Error parsing dispatch specification/, 'Malformed attribute selector ([att=bar) results in a helpful error' ); -=pod +TODO: { +local $TODO = "descendant selectors doesn't work yet"; # sel1 sel2 -is( HTML::Zoom->from_html('
') +is( eval { HTML::Zoom->from_html('
') ->select('table tr') - ->replace_content(\'') - ->to_html, + ->replace_content('') + ->to_html }, '
', 'sel1 sel2 works' ); - +diag($@) if $@; # sel1 sel2 sel3 -is( HTML::Zoom->from_html('
') +is( eval { HTML::Zoom->from_html('
') ->select('table tr td') ->replace_content('frew') - ->to_html, + ->to_html }, '
frew
frew
', 'sel1 sel2 sel3 works' ); - - - -=cut +diag($@) if $@; +} done_testing; -sub check_select{ +sub check_select { # less crude?: my $output = HTML::Zoom ->from_html($tmpl)