Commit | Line | Data |
f2ab5a41 |
1 | ################################################################################ |
2 | # |
3 | # !!!!! Do NOT edit this file directly! !!!!! |
4 | # |
5 | # Edit mktests.PL and/or parts/inc/pvs instead. |
6 | # |
7 | ################################################################################ |
8 | |
9 | BEGIN { |
10 | if ($ENV{'PERL_CORE'}) { |
11 | chdir 't' if -d 't'; |
12 | @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext'; |
13 | require Config; import Config; |
14 | use vars '%Config'; |
15 | if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) { |
16 | print "1..0 # Skip -- Perl configured without Devel::PPPort module\n"; |
17 | exit 0; |
18 | } |
19 | } |
20 | else { |
21 | unshift @INC, 't'; |
22 | } |
23 | |
c07deaaf |
24 | sub load { |
25 | eval "use Test"; |
26 | require 'testutil.pl' if $@; |
f2ab5a41 |
27 | } |
c07deaaf |
28 | |
29 | if (7) { |
30 | load(); |
f2ab5a41 |
31 | plan(tests => 7); |
32 | } |
33 | } |
34 | |
35 | use Devel::PPPort; |
36 | use strict; |
37 | $^W = 1; |
38 | |
39 | my $x = 'foo'; |
40 | |
41 | ok(Devel::PPPort::newSVpvs(), "newSVpvs"); |
42 | |
43 | Devel::PPPort::sv_catpvs($x); |
44 | ok($x, "foosv_catpvs"); |
45 | |
46 | Devel::PPPort::sv_setpvs($x); |
47 | ok($x, "sv_setpvs"); |
48 | |
49 | my %h = ('hv_fetchs' => 42); |
50 | Devel::PPPort::hv_stores(\%h, 4711); |
51 | ok(scalar keys %h, 2); |
52 | ok(exists $h{'hv_stores'}); |
53 | ok($h{'hv_stores'}, 4711); |
54 | ok(Devel::PPPort::hv_fetchs(\%h), 42); |
55 | |