svsetsv.t revision 1.1.1.2
1BEGIN {
2    push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
3    require Config; import Config;
4    if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
5        print "1..0 # Skip: XS::APItest was not built\n";
6        exit 0;
7    }
8}
9
10use strict;
11use warnings;
12
13use Test::More tests => 3;
14
15BEGIN { use_ok('XS::APItest') };
16
17# I can't see a good way to easily get back perl-space diagnostics for these
18# I hope that this isn't a problem.
19if ($] > 5.009) {
20  ok(sv_setsv_cow_hashkey_core,
21     "With PERL_CORE sv_setsv does COW for shared hash key scalars");
22} else {
23  ok(!sv_setsv_cow_hashkey_core,
24     "With PERL_CORE on 5.8.x sv_setsv doesn't COW for shared hash key scalars");
25}
26
27ok(!sv_setsv_cow_hashkey_notcore,
28   "Without PERL_CORE sv_setsv doesn't COW for shared hash key scalars");
29