summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2009-10-11 17:56:23 -0500
committerCraig A. Berry <craigberry@mac.com>2009-10-11 17:56:23 -0500
commit1518db6963d5c7acceca6dace1d6fcc78cf3aa37 (patch)
tree3e9cb0ebb31b7f46089d97cfadc3b8e30edf0976 /cpan
parentb590cc3cfe552a04543f662c8c0a80959d37562e (diff)
downloadperl-1518db6963d5c7acceca6dace1d6fcc78cf3aa37.tar.gz
Try for smarter (more portable) skip criteria in Encode's piconv.t.
We already differ from upstream, which skips when PERL_CORE is set. Since we apparently think we can run it in core now, it seems like we ought to sort out the proper skip criteria before sending it upstream.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Encode/t/piconv.t11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpan/Encode/t/piconv.t b/cpan/Encode/t/piconv.t
index d97bb2873d..b24d753899 100644
--- a/cpan/Encode/t/piconv.t
+++ b/cpan/Encode/t/piconv.t
@@ -3,17 +3,18 @@
#
use strict;
+use Config;
use FindBin;
use File::Spec;
use IPC::Open3 qw(open3);
use IO::Select;
use Test::More;
-my $WIN = $^O eq 'MSWin32';
+my $nofork = ! $Config{d_fork};
-if ($WIN) {
+if ($nofork) {
eval { require IPC::Run; IPC::Run->VERSION(0.83); 1; } or
- plan skip_all => 'Win32 environments require IPC::Run 0.83 to complete this test';
+ plan skip_all => 'Without fork(), we require IPC::Run 0.83 to complete this test';
}
sub run_cmd (;$$);
@@ -29,7 +30,7 @@ plan tests => 5;
{
my ( $st, $out, $err ) = run_cmd;
is( $st, 0, 'status for usage call' );
- is( $out, $WIN ? undef : '' );
+ is( $out, $nofork ? undef : '' );
like( $err, qr{^piconv}, 'usage' );
}
@@ -51,7 +52,7 @@ sub run_cmd (;$$) {
my $err = "x" x 10_000;
$err = "";
- if ($WIN) {
+ if ($nofork) {
IPC::Run->import(qw(run timeout));
my @cmd;
if (defined $args) {