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 | # |
cac25305 |
7 | # This file was automatically generated from the definition files in the |
8 | # parts/inc/ subdirectory by mktests.PL. To learn more about how all this |
9 | # works, please read the F<HACKERS> file that came with this distribution. |
10 | # |
f2ab5a41 |
11 | ################################################################################ |
12 | |
13 | BEGIN { |
14 | if ($ENV{'PERL_CORE'}) { |
15 | chdir 't' if -d 't'; |
0ff33da8 |
16 | @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext'; |
f2ab5a41 |
17 | require Config; import Config; |
18 | use vars '%Config'; |
19 | if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) { |
20 | print "1..0 # Skip -- Perl configured without Devel::PPPort module\n"; |
21 | exit 0; |
22 | } |
23 | } |
24 | else { |
25 | unshift @INC, 't'; |
26 | } |
27 | |
c07deaaf |
28 | sub load { |
29 | eval "use Test"; |
30 | require 'testutil.pl' if $@; |
f2ab5a41 |
31 | } |
c07deaaf |
32 | |
8565c31a |
33 | if (11) { |
c07deaaf |
34 | load(); |
8565c31a |
35 | plan(tests => 11); |
f2ab5a41 |
36 | } |
37 | } |
38 | |
39 | use Devel::PPPort; |
40 | use strict; |
41 | $^W = 1; |
42 | |
236afa0a |
43 | package Devel::PPPort; |
44 | use vars '@ISA'; |
45 | require DynaLoader; |
46 | @ISA = qw(DynaLoader); |
47 | bootstrap Devel::PPPort; |
48 | |
49 | package main; |
50 | |
f2ab5a41 |
51 | my $x = 'foo'; |
52 | |
53 | ok(Devel::PPPort::newSVpvs(), "newSVpvs"); |
c1a049cb |
54 | ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags"); |
f2ab5a41 |
55 | |
56 | Devel::PPPort::sv_catpvs($x); |
57 | ok($x, "foosv_catpvs"); |
58 | |
59 | Devel::PPPort::sv_setpvs($x); |
60 | ok($x, "sv_setpvs"); |
61 | |
62 | my %h = ('hv_fetchs' => 42); |
63 | Devel::PPPort::hv_stores(\%h, 4711); |
64 | ok(scalar keys %h, 2); |
65 | ok(exists $h{'hv_stores'}); |
66 | ok($h{'hv_stores'}, 4711); |
67 | ok(Devel::PPPort::hv_fetchs(\%h), 42); |
8565c31a |
68 | ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); |
69 | ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); |
70 | ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); |
f2ab5a41 |
71 | |