summaryrefslogtreecommitdiff
path: root/ext/Devel/PPPort/t/ppphtest.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Devel/PPPort/t/ppphtest.t')
-rw-r--r--ext/Devel/PPPort/t/ppphtest.t39
1 files changed, 37 insertions, 2 deletions
diff --git a/ext/Devel/PPPort/t/ppphtest.t b/ext/Devel/PPPort/t/ppphtest.t
index 9040c92360..d6dc3442f4 100644
--- a/ext/Devel/PPPort/t/ppphtest.t
+++ b/ext/Devel/PPPort/t/ppphtest.t
@@ -24,10 +24,10 @@ BEGIN {
eval "use Test";
if ($@) {
require 'testutil.pl';
- print "1..197\n";
+ print "1..202\n";
}
else {
- plan(tests => 197);
+ plan(tests => 202);
}
}
@@ -35,6 +35,15 @@ use Devel::PPPort;
use strict;
$^W = 1;
+BEGIN {
+ if ($ENV{'SKIP_PPPHTEST'}) {
+ for (1 .. 202) {
+ ok(1);
+ }
+ exit 0;
+ }
+}
+
use File::Path qw/rmtree mkpath/;
use Config;
@@ -755,3 +764,29 @@ newSViv();
newSViv();
+===============================================================================
+
+# check if explicit variables are handled propery
+
+my $o = ppport(qw(--copy=a));
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o =~ /^Uses PL_signals/m);
+ok($o =~ /^File needs PL_signals, adding static request/m);
+ok(eq_files('MyExt.xsa', 'MyExt.ra'));
+
+unlink qw(MyExt.xsa);
+
+---------------------------- MyExt.xs -----------------------------------------
+
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+
+---------------------------- MyExt.ra -----------------------------------------
+
+#define NEED_PL_signals
+#include "ppport.h"
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+