1 ################################################################################
3 # !!!!! Do NOT edit this file directly! !!!!!
5 # Edit mktests.PL and/or parts/inc/magic instead.
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.
11 ################################################################################
14 if ($ENV{'PERL_CORE'}) {
16 @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
17 require Config; import Config;
19 if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
20 print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
30 require 'testutil.pl' if $@;
43 package Devel::PPPort;
46 @ISA = qw(DynaLoader);
47 bootstrap Devel::PPPort;
53 tie %h, 'Tie::StdHash';
57 &Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
58 ok($h{foo}, 'foobar');
60 &Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
63 &Devel::PPPort::sv_catsv_mg($h{foo}, '42');
64 ok($h{foo}, 'foobar42');
66 &Devel::PPPort::sv_setiv_mg($h{bar}, 42);
69 &Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
70 ok(abs($h{PI} - 3.14159) < 0.01);
72 &Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
75 &Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
76 ok($h{mhx}, 'Marcus');
78 &Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
81 &Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
84 &Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
87 my $ver = eval qq[qv("v1.2.0")];
88 ok($[ < 5.009 || $@ eq '');
89 ok($@ || Devel::PPPort::SvVSTRING_mg($ver));
90 ok(!Devel::PPPort::SvVSTRING_mg(4711));
93 ok(Devel::PPPort::sv_magic_portable($foo));