pod2usage({ -verbose => 0, -exit => 'noexit',
-output => \*FAKEOUT, -input => $file });
};
- like( $@, qr/^Can't open $file for reading:/,
+ like( $@, qr/^Can't open $file/,
'File not found without -pathlist' );
eval {
is( $$fake_out, $vbl_0, '-pathlist parameter' );
}
-{ # Test exit status from pod2usage()
+SKIP: { # Test exit status from pod2usage()
+ skip "Exit status broken on Mac OS", 1 if $^O eq 'MacOS';
my $exit = ($^O eq 'VMS' ? 2 : 42);
my $dev_null = File::Spec->devnull;
my $args = join ", ", (
my $cq = (($^O eq 'MSWin32'
|| $^O eq 'NetWare'
|| $^O eq 'VMS') ? '"'
- : "'");
+ : "");
my @params = ( "${cq}-I../lib$cq", "${cq}-MPod::Usage$cq", '-e' );
my $prg = qq[${cq}pod2usage({ $args })$cq];
my @cmd = ( $^X, @params, $prg );
+ print "# cmd = @cmd\n";
+
is( system( @cmd ) >> 8, $exit, 'Exit status of pod2usage()' );
}