Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
use Test::More; |
| 7 |
require "./t/utils.pl"; |
| 8 |
|
| 9 |
plan tests => 3; |
| 10 |
|
| 11 |
# use an absolute pathname in case a test chdir()s |
| 12 |
my $pp = catfile(getcwd(), qw( blib script pp )); |
| 13 |
|
| 14 |
# runs 1 test |
| 15 |
sub pp_p_ok |
| 16 |
{ |
| 17 |
$ENV{PAR_TMPDIR} ||= tempdir(TMPDIR => 1, CLEANUP => 1); |
| 18 |
my $par = catfile($ENV{PAR_TMPDIR},"my.par"); |
| 19 |
unlink($par); |
| 20 |
|
| 21 |
die "system(LIST) with double quotes in LIST doesn't work on Windows: @_" |
| 22 |
if grep { /"/ } @_; |
| 23 |
# Note: The test harness runs tests |
| 24 |
# with PERL5LIB prepended as if "-Mblib" was in effect |
| 25 |
system($^X, $pp, -p => -o => $par, @_); |
| 26 |
ok( $? == 0 && -f $par, qq[successfully packed "$par"] ); |
| 27 |
|
| 28 |
return $par; |
| 29 |
} |
| 30 |
|
| 31 |
my $par = pp_p_ok(-I => "t/data/blib/lib", -I => "t/data/blib/arch", |
| 32 |
-e => "use XSFoo;"); |
| 33 |
|
| 34 |
my ($out, $err) = run_ok($^X, "-MPAR=$par", -e => "use XSFoo; XSFoo::hello()"); |
| 35 |
like($out, qr/greetings from XSFoo/, "output from XSFoo::hello matches"); |
| 36 |
|