2 if( $ENV{PERL_CORE} ) {
9 use Test::More tests => 12;
14 local $SIG{__WARN__} = sub { $warnings .= join '', @_ };
16 is( undef, undef, 'undef is undef');
17 is( $warnings, '', ' no warnings' );
19 isnt( undef, 'foo', 'undef isnt foo');
20 is( $warnings, '', ' no warnings' );
22 isnt( undef, '', 'undef isnt an empty string' );
23 isnt( undef, 0, 'undef isnt zero' );
25 like( undef, '/.*/', 'undef is like anything' );
26 is( $warnings, '', ' no warnings' );
28 eq_array( [undef, undef], [undef, 23] );
29 is( $warnings, '', 'eq_array() no warnings' );
31 eq_hash ( { foo => undef, bar => undef },
32 { foo => undef, bar => 23 } );
33 is( $warnings, '', 'eq_hash() no warnings' );
35 eq_set ( [undef, undef, 12], [29, undef, undef] );
36 is( $warnings, '', 'eq_set() no warnings' );
39 eq_hash ( { foo => undef, bar => { baz => undef, moo => 23 } },
40 { foo => undef, bar => { baz => undef, moo => 23 } } );
41 is( $warnings, '', 'eq_hash() no warnings' );