6 unless (eval 'use Devel::Cycle 1.11; 1') {
7 plan skip_all => 'Devel::Cycle 1.11 required for this test';
14 use lib "$FindBin::Bin/lib";
16 BEGIN { $::setup_leakchecker = 1 }
17 local $SIG{__WARN__} = sub { return if $_[0] =~ /Unhandled type: (GLOB|REGEXP)/; warn $_[0] };
18 use Catalyst::Test 'TestApp';
21 my ($resp, $ctx) = ctx_request('/contextclosure/normal_closure');
22 ok($resp->is_success);
23 #is($ctx->count_leaks, 1);
24 # FIXME: find out why this changed from 1 to 2 after 52af51596d
25 # ^^ probably has something to do with env being in Engine and Request - JNAP
26 # ^^ I made the env in Engine a weak ref, should help until we can remove it
27 is($ctx->count_leaks, 1);
31 my ($resp, $ctx) = ctx_request('/contextclosure/context_closure');
32 ok($resp->is_success);
33 is($ctx->count_leaks, 0);
37 my ($resp, $ctx) = ctx_request('/contextclosure/non_closure');
38 ok($resp->is_success);
39 is($ctx->count_leaks, 0);