File: 10_memory.t

package info (click to toggle)
libtest-fake-httpd-perl 0.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 164 kB
  • sloc: perl: 144; sh: 4; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test::More;
eval "use Test::Memory::Cycle";
plan skip_all => "Test::Memory::Cycle required for testing memory leaks" if $@;
plan skip_all => "set TEST_MEMORY or TEST_ALL to enable this test"
    unless $ENV{TEST_MEMORY} or $ENV{TEST_ALL};

use Test::Fake::HTTPD;

my $httpd = run_http_server {
    my $req = shift;
    [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ];
};

memory_cycle_ok($httpd);
memory_cycle_ok($httpd->{server});

done_testing;