File: 12_depth.t

package info (click to toggle)
libhtml-tableextract-perl 2.15-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 284 kB
  • sloc: perl: 1,558; makefile: 2
file content (21 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use strict;
use lib './lib';
use Test::More tests => 222;

use FindBin;
use lib $FindBin::RealBin;
use testload;

my $file = "$Dat_Dir/basic.html";

use HTML::TableExtract;

# By count
my $label = 'by depth';
my $te = HTML::TableExtract->new( depth => 1 );
ok($te->parse_file($file), "$label (parse_file)");
my @tablestates = $te->tables;
cmp_ok(@tablestates, '==', 2, "$label (extract count)");
good_data($_, "$label (data)") foreach @tablestates;