| 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | use HTML::TreeBuilder::LibXML; |
| 5 | |
| 6 | plan tests => 2; |
| 7 | |
| 8 | { |
| 9 | my $root = HTML::TreeBuilder::LibXML->new_from_content("<html><body>", "<p>foo</p>", "</body></html>"); |
| 10 | is $root->findvalue("//p"), "foo"; |
| 11 | } |
| 12 | |
| 13 | { |
| 14 | my $root = HTML::TreeBuilder::LibXML->new_from_file("t/test.html"); |
| 15 | is $root->findvalue("//p"), "bar"; |
| 16 | } |