1 ################################################################################
3 # !!!!! Do NOT edit this file directly! !!!!!
5 # Edit mktests.PL and/or parts/inc/magic instead.
7 ################################################################################
10 if ($ENV{'PERL_CORE'}) {
12 @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext';
13 require Config; import Config;
15 if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
16 print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
26 require 'testutil.pl';
40 tie %h, 'Tie::StdHash';
44 &Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
45 ok($h{foo}, 'foobar');
47 &Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
50 &Devel::PPPort::sv_catsv_mg($h{foo}, '42');
51 ok($h{foo}, 'foobar42');
53 &Devel::PPPort::sv_setiv_mg($h{bar}, 42);
56 &Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
57 ok(abs($h{PI} - 3.14159) < 0.01);
59 &Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
62 &Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
63 ok($h{mhx}, 'Marcus');
65 &Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
68 &Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
71 &Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
74 my $ver = eval qq[qv("v1.2.0")];
75 ok($[ < 5.009 || $@ eq '');
76 ok($@ || Devel::PPPort::SvVSTRING_mg($ver));
77 ok(!Devel::PPPort::SvVSTRING_mg(4711));