File: 08-leak.t

package info (click to toggle)
libweb-scraper-perl 0.38-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 308 kB
  • sloc: perl: 473; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use Test::Base;

use Web::Scraper;
plan skip_all => "LEAK_TEST is not defined"
    unless $ENV{LEAK_TEST} || $ENV{TEST_ALL};

plan tests => 1;

filters {
    selector => 'chomp',
    expected => 'chomp',
};

run {
    my $block = shift;

    for (1..10) {
        my $s = scraper {
            process $block->selector, text => 'TEXT';
            result 'text';
        };
        my $text = $s->scrape($block->html);
        diag `ps uxww | grep "08-leak.t" | grep -v grep | grep -v harness`;
    }
};

ok 1;

__DATA__

===
--- html
<div id="foo">bar</div>
--- selector
div#foo
--- expected
bar