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' if $@;
41 tie %h, 'Tie::StdHash';
45 &Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
46 ok($h{foo}, 'foobar');
48 &Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
51 &Devel::PPPort::sv_catsv_mg($h{foo}, '42');
52 ok($h{foo}, 'foobar42');
54 &Devel::PPPort::sv_setiv_mg($h{bar}, 42);
57 &Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
58 ok(abs($h{PI} - 3.14159) < 0.01);
60 &Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
63 &Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
64 ok($h{mhx}, 'Marcus');
66 &Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
69 &Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
72 &Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
75 my $ver = eval qq[qv("v1.2.0")];
76 ok($[ < 5.009 || $@ eq '');
77 ok($@ || Devel::PPPort::SvVSTRING_mg($ver));
78 ok(!Devel::PPPort::SvVSTRING_mg(4711));