X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Foptional_memleak.t;h=ca4cbcf2c6013d890f6fad11173de15c1cdcfb89;hp=b45445169aef099d91a5fe87b8fee258fadf8d22;hb=199731fb710c6a165793f055f85de60539039dfe;hpb=15f0ede8ee33bc9b0c002221a8e62f59e8b7b7e2 diff --git a/t/optional_memleak.t b/t/optional_memleak.t index b454451..ca4cbcf 100644 --- a/t/optional_memleak.t +++ b/t/optional_memleak.t @@ -1,17 +1,16 @@ -#!perl - use strict; use warnings; +use Test::More; +BEGIN { + plan skip_all => 'set TEST_MEMLEAK to enable this test' + unless $ENV{TEST_MEMLEAK}; +} + use FindBin; use lib "$FindBin::Bin/lib"; - -use Test::More; use Catalyst::Test 'TestApp'; -plan skip_all => 'set TEST_MEMLEAK to enable this test' - unless $ENV{TEST_MEMLEAK}; - eval "use Proc::ProcessTable"; plan skip_all => 'Proc::ProcessTable required for this test' if $@; @@ -66,7 +65,7 @@ sub run_test { print "Final Size: $final\n"; if ( $final > $initial ) { - print "Leaked: " . ($final - $initial) . "\n"; + print "Leaked: " . ($final - $initial) . "K\n"; } is( $final, $initial, "'$uri' memory is not leaking" );