Test-XPath
view release on metacpan or search on metacpan
t/css_selector.t view on Meta::CPAN
is_html => 1,
filter => 'css_selector',
), 'Create Test::XPath object with CSS selector support';
# Try successful ok.
test_out( 'ok 1 - whatever');
$xp->ok('> html > head > title', 'whatever');
test_test('ok works');
# Try failed ok.
my $file = File::Spec->catfile(split m{/} => __FILE__);
test_out('not ok 1 - whatever');
test_err(qq{# Failed test 'whatever'\n# at $file line 34.});
$xp->ok('> html > head > foo', 'whatever');
test_test('ok fail works');
# Try a recursive call.
test_out( 'ok 1 - p');
test_out( 'ok 2 - em');
test_out( 'ok 3 - b');
test_out( 'ok 4 - em');
xml => $html,
is_html => 1,
), 'Create Test::XPath object';
# Try successful ok.
test_out( 'ok 1 - whatever');
$xp->ok('/html/head/title', 'whatever');
test_test('ok works');
# Try failed ok.
my $file = File::Spec->catfile(split m{/} => __FILE__);
test_out('not ok 1 - whatever');
test_err(qq{# Failed test 'whatever'\n# at $file line 26.});
$xp->ok('/html/head/foo', 'whatever');
test_test('ok fail works');
# Try a recursive call.
test_out( 'ok 1 - p');
test_out( 'ok 2 - em');
test_out( 'ok 3 - b');
test_out( 'ok 4 - em');
( run in 1.332 second using v1.01-cache-2.11-cpan-71847e10f99 )