forked from rurban/perl-compiler
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 in BC/perl-compiler from internals-v to bc528
* commit 'a7b3b1b948af969b5446500f73f7b11187d69f72': Clear Internals::V patches list to avoid them as COWPVs
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../template.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!perl | ||
|
||
BEGIN { | ||
chdir 't' if -d 't'; | ||
require './test.pl'; | ||
} | ||
|
||
|
||
plan tests => 5; | ||
|
||
my @patches = ( | ||
q["cPanel - disable man installs"], | ||
q["cPanel - cPanel INC PATH"], | ||
q["cPanel - COW Static support"], | ||
q["cPanel - Disable xs handshake"], | ||
); | ||
|
||
if ( $0 =~ m{\.bin$} ) { | ||
my $cfile = $0; | ||
$cfile =~ s{bin$}{c}; | ||
|
||
ok -e $cfile, "cfile exists $cfile"; | ||
|
||
foreach my $patch ( @patches ) { | ||
my $matches = int qx{egrep -c '#define COWPV.*$patch' $cfile}; | ||
|
||
print qq[# grep $patch matches $matches\n]; | ||
is $matches, 0, "patches name is not leak in the cfile [COWPV]"; | ||
} | ||
} | ||
else { | ||
my $tests = 1 + scalar @patches; | ||
ok( 1, "-- skipped not compiled" ) for 1 .. $tests; | ||
} | ||
|