5 if ($ENV{'PERL_CORE'}){
7 unshift @INC, '../lib';
16 ### Start of Testing ###
18 # Make sure threads are really off
19 ok( !$INC{"threads.pm"} );
21 # Check each faked function.
22 foreach my $func (qw(share cond_wait cond_signal cond_broadcast)) {
23 ok( my $func_ref = __PACKAGE__->can($func) ? 1 : 0 );
26 ok( $@, qr/^Not enough arguments / );
28 my %hash = (foo => 42, bar => 23);
29 eval qq{$func(\%hash)};
35 # These all have no return value.
36 foreach my $func (qw(cond_wait cond_signal cond_broadcast)) {
37 my @array = qw(1 2 3 4);
38 ok( eval qq{$func(\@array)}, undef );
39 ok( "@array", "1 2 3 4" );
42 # share() is supposed to return back it's argument as a ref.
44 my @array = qw(1 2 3 4);
45 ok( share(@array), \@array );
46 ok( ref &share({}), 'HASH' );
47 ok( "@array", "1 2 3 4" );
50 # lock() should be a no-op. The return value is currently undefined.
52 my @array = qw(1 2 3 4);
54 ok( "@array", "1 2 3 4" );