Commit | Line | Data |
3e8ab2ef |
1 | BEGIN { |
3e8ab2ef |
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 | |
10 | use strict; |
11 | use warnings; |
12 | |
13 | use Test::More tests => 3; |
14 | |
15 | BEGIN { 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. |
9568a123 |
19 | if ($] > 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 | } |
3e8ab2ef |
26 | |
27 | ok(!sv_setsv_cow_hashkey_notcore, |
28 | "Without PERL_CORE sv_setsv doesn't COW for shared hash key scalars"); |