Ticket #1322: padre-universal-config-tiny-path.diff
| File padre-universal-config-tiny-path.diff, 1.5 KB (added by ofosos, 20 months ago) |
|---|
-
t/collection/Config-Tiny/t/02_main.t
9 9 $^W = 1; 10 10 } 11 11 12 use UNIVERSAL;12 use Scalar::Util 'reftype'; 13 13 use Test::More tests => 33; 14 14 15 15 use vars qw{$VERSION}; … … 32 32 ok( $Trivial, '->new returns true' ); 33 33 ok( ref $Trivial, '->new returns a reference' ); 34 34 35 # Legitimate use of UNIVERSAL::isa 36 ok( UNIVERSAL::isa( $Trivial, 'HASH' ), '->new returns a hash reference' ); 35 ok( reftype($Trivial) eq 'HASH' ), '->new returns a hash reference' ); 37 36 isa_ok( $Trivial, 'Config::Tiny' ); 38 37 ok( scalar keys %$Trivial == 0, '->new returns an empty object' ); 39 38 … … 42 41 ok( $Config, '->read returns true' ); 43 42 ok( ref $Config, '->read returns a reference' ); 44 43 45 # Legitimate use of UNIVERSAL::isa 46 ok( UNIVERSAL::isa( $Config, 'HASH' ), '->read returns a hash reference' ); 44 ok( reftype($Config) eq 'HASH' ), '->read returns a hash reference' ); 47 45 isa_ok( $Config, 'Config::Tiny' ); 48 46 49 47 # Check the structure of the config … … 104 102 ok( $Read, '->read of what we wrote returns true' ); 105 103 ok( ref $Read, '->read of what we wrote returns a reference' ); 106 104 107 # Legitimate use of UNIVERSAL::isa 108 ok( UNIVERSAL::isa( $Read, 'HASH' ), '->read of what we wrote returns a hash reference' ); 105 ok( reftype($Read) eq 'HASH' ), '->read of what we wrote returns a hash reference' ); 109 106 isa_ok( $Read, 'Config::Tiny' ); 110 107 111 108 # Check the structure of what we read back in
