6709e52925d3a4c9f9109a0571e2088259e03868
[p5sagit/Config-Any.git] / t / 70-leak.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Config::Any;
6
7 eval { require Test::LeakTrace; };
8
9 if( $@ ) {
10     plan skip_all => 'Test::LeakTrace required for this test';
11 }
12 else {
13     plan tests => 1;
14 }
15
16 Test::LeakTrace::no_leaks_ok( sub { 
17     Config::Any->load_files( {
18         files           => [ qw( t/conf/conf.pl ) ],
19         use_ext         => 1,
20         flatten_to_hash => 1,
21         force_plugins   => [ 'Config::Any::Perl' ],
22     } );
23 } );
24
25 1;
26
27 __END__
28 t/70-leak.t .. 
29 1..1
30 not ok 1 - leaks 1 == 0
31
32 #   Failed test 'leaks 1 == 0'
33 #   at t/70-leak.t line 23.
34 #          got: 1
35 #     expected: 0
36 # leaked SCALAR(0x95049d8) from /usr/lib/perl/5.10/XSLoader.pm line 94.
37 #   93:    push(@DynaLoader::dl_shared_objects, $file); # record files loaded
38 #   94:    return &$xs(@_);
39 #   95:
40 # SV = PV(0x94d6f88) at 0x95049d8
41 #   REFCNT = 1
42 #   FLAGS = (POK,pPOK)
43 #   PV = 0x95035e8 "t/conf/conf.pl"\0
44 #   CUR = 14
45 #   LEN = 16
46 # Looks like you failed 1 test of 1.
47 Dubious, test returned 1 (wstat 256, 0x100)
48 Failed 1/1 subtests 
49
50 Test Summary Report
51 -------------------
52 t/70-leak.t (Wstat: 256 Tests: 1 Failed: 1)
53   Failed test:  1
54   Non-zero exit status: 1
55 Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.04 cusr  0.00 csys =  0.07 CPU)
56 Result: FAIL
57