Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: TODO blocks for Test::XML, and in general

by nglenn (Beadle)
on Sep 04, 2012 at 17:31 UTC ( #991664=note: print w/ replies, xml ) Need Help??


in reply to Re: TODO blocks for Test::XML, and in general
in thread TODO blocks for Test::XML, and in general

I updated it. Running with prove shows that the test causes the entire test suite to fail.


Comment on Re^2: TODO blocks for Test::XML, and in general
Download Code
Re^3: TODO blocks for Test::XML, and in general
by MidLifeXis (Monsignor) on Sep 04, 2012 at 18:18 UTC

    Stupid question, but does my snippet above emit a TODO test?

    I also rebuilt the like_xpath routine after removing the lines making use of the XPath parser (see below). What output do you get from it?

    use strict; use warnings; use Carp; use Test::More; use Test::Builder; sub like_xpath { my ($input, $statement, $test_name) = @_; die "usage: like_xpath(xml,xpath[,name])" unless $input && $statement; my $Test = Test::Builder->new; my $ok = eval { # Hardcode a failure return 0; }; if ($@) { $Test->ok( 0, $test_name ); $Test->diag( " Parse Failure: $@" ); return 0; } else { ok( $ok, $test_name ); unless ( $ok ) { diag ( " input: $input" ); diag ( " does not match: $statement" ); } return $ok; } } plan tests=>1; TODO: { local $TODO = 'testing todo block'; like_xpath('<xml-bad/>', '/xml', 'test test'); }

    --MidLifeXis

      Your snippet and your edited version both result in TODO tests, and a passing grade for the test suite. Don't know why...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2015-07-01 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls