Debian Codegraph @

t/matches.t

raw symbols SCIP
1 use strict;
2 use warnings;
3 use Test::More;
4 use HTML::TreeBuilder::LibXML;
5 use Data::Dumper;
6
7
8
9 my $tree = HTML::TreeBuilder::LibXML->new_from_content('<p class="foo">bar</p>');
10 my ($el) = $tree->guts;
11
12
13 is $el->matches('//p[@class="foo"]'), 1, 'matches - positive';
14 is $el->matches('//p[@class="bar"]'), undef, 'matches - negative';
15
16
17
18
19
20 done_testing;