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