background image
<< It'll Never Work | explicitly skip a set of tests >>
<< It'll Never Work | explicitly skip a set of tests >>
Skipping Tests
Skipping Tests
Let's assume we have a test for an HTML generator.
Let's also assume that if we have HTML::Lint, we want to lint
the generated code.
require HTML::Lint;
my $lint = HTML::Lint->new;
isa_ok( $lint, 'HTML::Lint' );
$lint->parse( $some_html );
is( $lint->errors, 0, 'No errors found in HTML' );
Since HTML::Lint is optional, this test will fail if you don't have
it.
But it's not a real failure, else HTML::Lint isn't really optional.
So the user shouldn't hear about it.