]>
iEval git - html-element-library.git/blob - t/lib.pm
5 use File
::Slurp qw
/read_file/;
7 use HTML
::Element
::Library
;
11 use parent qw
/Exporter/;
12 our @EXPORT = qw
/is is_deeply is_xml slurp mktree isxml/;
13 our $VERSION = '0.001'; # Exporter needs a $VERSION
16 my ($self, @args) = @_;
19 Test
::More
->import(@args);
21 $self->export_to_level(1, $self);
24 sub slurp
{ scalar read_file
@_ }
28 HTML
::TreeBuilder
->new_from_file($file)->disembowel;
32 my ($tree, $file, $name) = @_;
33 my $res = ref $tree eq 'SCALAR' ?
$$tree : $tree->as_XML;
34 my $exp = ref $file eq 'SCALAR' ?
$$file : slurp
$file;
35 is_xml
$res, $exp, $name
This page took 0.047371 seconds and 4 git commands to generate.