Line | |
---|
1 | ################################################################################
|
---|
2 | #
|
---|
3 | # !!!!! Do NOT edit this file directly! !!!!!
|
---|
4 | #
|
---|
5 | # Edit mktests.PL and/or parts/inc/mPUSH 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 |
|
---|
24 | eval "use Test";
|
---|
25 | if ($@) {
|
---|
26 | require 'testutil.pl';
|
---|
27 | print "1..8\n";
|
---|
28 | }
|
---|
29 | else {
|
---|
30 | plan(tests => 8);
|
---|
31 | }
|
---|
32 | }
|
---|
33 |
|
---|
34 | use Devel::PPPort;
|
---|
35 | use strict;
|
---|
36 | $^W = 1;
|
---|
37 |
|
---|
38 | ok(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
|
---|
39 | ok(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
|
---|
40 | ok(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
|
---|
41 | ok(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
|
---|
42 |
|
---|
43 | ok(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
|
---|
44 | ok(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
|
---|
45 | ok(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
|
---|
46 | ok(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
|
---|
47 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.