use FindBin qw($Bin);
print "# $Bin\n";
-
-if ($^O eq 'MacOS') {
- print "not " unless $Bin =~ m,:lib:$,;
-} else {
- print "not " unless $Bin =~ m,[/.]lib\]?$,;
-}
+print "not " unless $Bin =~ m,[/.]lib\]?$,;
print "ok 1\n";
$0 = "-";
sub _cleanup {
rmdir foreach reverse (@_);
- unlink "stderr" unless $^O eq 'MacOS';
+ unlink "stderr";
}
sub _mkdirs {
BEGIN {
- if ($^O eq 'MacOS')
- {
- $MacPerl::Architecture = $MacPerl::Architecture; # shhhhh
- $blib = ":blib:";
- $blib_lib = ":blib:lib:";
- $blib_arch = ":blib:lib:$MacPerl::Architecture:";
- @blib_dirs = ($blib, $blib_lib, $blib_arch); # order
- }
- else
- {
- $blib = "blib";
- $blib_arch = "blib/arch";
- $blib_lib = "blib/lib";
- @blib_dirs = ($blib, $blib_arch, $blib_lib);
- }
+ $blib = "blib";
+ $blib_arch = "blib/arch";
+ $blib_lib = "blib/lib";
+ @blib_dirs = ($blib, $blib_arch, $blib_lib);
_cleanup( @blib_dirs );
}
$blib_arch = 'blib.arch]';
$blib_lib = 'blib.lib]';
}
-elsif ($^O ne 'MacOS')
+else
{
$blib_arch = File::Spec->catdir("blib","arch");
$blib_lib = File::Spec->catdir("blib","lib");
print "not " unless "\N{NULL}" eq "\c@";
print "ok 25\n";
-if ($^O eq 'MacOS')
-{
- print "not " unless "\N{CARRIAGE RETURN (CR)}" eq "\n";
- print "ok 26\n";
-
- print "not " unless "\N{CARRIAGE RETURN}" eq "\n";
- print "ok 27\n";
+print "not " unless "\N{LINE FEED (LF)}" eq "\n";
+print "ok 26\n";
- print "not " unless "\N{CR}" eq "\n";
- print "ok 28\n";
-}
-else
-{
- print "not " unless "\N{LINE FEED (LF)}" eq "\n";
- print "ok 26\n";
+print "not " unless "\N{LINE FEED}" eq "\n";
+print "ok 27\n";
- print "not " unless "\N{LINE FEED}" eq "\n";
- print "ok 27\n";
-
- print "not " unless "\N{LF}" eq "\n";
- print "ok 28\n";
-}
+print "not " unless "\N{LF}" eq "\n";
+print "ok 28\n";
my $nel = ord("A") == 193 ? qr/^(?:\x15|\x25)$/ : qr/^\x85$/;
$res =~ s/\n%[A-Z]+-[SIWEF]-.*$// # clip off DCL status msg
if $^O eq "VMS";
$exp =~ s/[\r\n]+$//;
- if ($^O eq "MacOS") {
- $exp =~ s{(\./)?abc\.pm}{:abc.pm}g;
- $exp =~ s{./abc} {:abc}g;
- }
my $pfx = ($res =~ s/^PREFIX\n//);
my $rexp = qr{^$exp};
if ($res =~ s/^SKIPPED\n//) {
#!./perl
BEGIN {
- if ($^O eq 'MacOS') {
- chdir '::' if -d '::pod' && -d '::t';
- @INC = ':lib:';
- } else {
- chdir '..' if -d '../pod' && -d '../t';
- @INC = 'lib';
- }
+ chdir '..' if -d '../pod' && -d '../t';
+ @INC = 'lib';
}
use Test::More tests => 2;
}
$Is_VMS_traildot = 0 if $drop_dot && unix_rpt;
}
-if ($^O eq 'MacOS') { $extracted_program = '::utils:h2xs'; }
if (!(-e $extracted_program)) {
print "1..0 # Skip: $extracted_program was not built\n";
exit 0;
my $dupe = '2>&1';
# ok on unix, nt, The extra \" are for VMS
my $lib = '"-I../lib" "-I../../lib"';
-# The >&1 would create a file named &1 on MPW (STDERR && STDOUT are
-# already merged).
-if ($^O eq 'MacOS') {
- $dupe = '';
- # -x overcomes MPW $Config{startperl} anomaly
- $lib = '-x -I::lib: -I:::lib:';
-}
# $name should differ from system header file names and must
# not already be found in the t/ subdirectory for perl.
my $name = 'h2xst';
cmp_ok ($?, "==", 0, "running $prog ");
$result = join("",@result);
- # accomodate MPW # comment character prependage
- if ($^O eq 'MacOS') {
- $result =~ s/#\s*//gs;
- }
-
#print "# expectation is >$expectation<\n";
#print "# result is >$result<\n";
# Was the output the list of files that were expected?
find (sub {$got{$File::Find::name}++ unless -d $_}, $name);
foreach ($expectation =~ /Writing\s+(\S+)/gm) {
- if ($^O eq 'MacOS') {
- $_ = ':' . join(':',split(/\//,$_));
- $_ =~ s/$name:t:1.t/$name:t\/1.t/; # is this an h2xs bug?
- }
if ($^O eq 'VMS') {
if ($Is_VMS_traildot) {
$_ .= '.' unless $_ =~ m/\./;
BEGIN { use_ok('Yup') }
BEGIN {
- if ($^O eq 'MacOS') {
- for ($Lib_Dir, $Arch_Dir) {
- tr|/|:|;
- $_ .= ":" unless /:$/;
- $_ = ":$_" unless /^:/; # we know this path is relative
- }
- }
is( $INC[1], $Lib_Dir, 'lib adding at end of @INC' );
print "# \@INC == @INC\n";
is( $INC[0], $Arch_Dir, ' auto/ dir in front of that' );
# Yes, %INC uses Unixy filepaths.
# Not on Mac OS, it doesn't ... it never has, at least.
my $path = join("/",$Lib_Dir, 'Yup.pm');
- if ($^O eq 'MacOS') {
- $path = $Lib_Dir . 'Yup.pm';
- }
is( $INC{'Yup.pm'}, $path, '%INC set properly' );
is( eval { do 'Yup.pm' }, 42, 'do() works' );
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
- push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
}
my @prgs = () ;
-foreach (sort glob($^O eq 'MacOS' ? ":lib:strict:*" : "lib/strict/*")) {
+foreach (sort glob("lib/strict/*")) {
next if -d || /(~|\.orig|,v)$/;
while (@files > 2) {
my $filename = shift @files ;
my $code = shift @files ;
- $code =~ s|\./abc|:abc|g if $^O eq 'MacOS';
push @temps, $filename ;
open F, ">$filename" or die "Cannot open $filename: $!\n" ;
print F $code ;
}
shift @files ;
$prog = shift @files ;
- $prog =~ s|\./abc|:abc|g if $^O eq 'MacOS';
}
my $tmpfile = tempfile();
open TEST, ">$tmpfile" or die "Could not open: $!";
`.\\perl -I../lib $switch $tmpfile 2>&1` :
$^O eq 'NetWare' ?
`perl -I../lib $switch $tmpfile 2>&1` :
- $^O eq 'MacOS' ?
- `$^X -I::lib -MMac::err=unix $switch $tmpfile` :
`$^X $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
$results =~ s/tmp\d+[A-Z][A-Z]?/-/g;
$results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg
$expected =~ s/\n+$//;
- $expected =~ s|(\./)?abc\.pm|:abc.pm|g if $^O eq 'MacOS';
- $expected =~ s|./abc|:abc|g if $^O eq 'MacOS';
my $prefix = ($results =~ s/^PREFIX\n//) ;
my $TODO = $prog =~ m/^#\s*TODO:/;
if ( $results =~ s/^SKIPPED\n//) {
my $Is_VMS = $^O eq 'VMS';
my $Is_MSWin32 = $^O eq 'MSWin32';
my $Is_NetWare = $^O eq 'NetWare';
-my $Is_MacOS = $^O eq 'MacOS';
my $i = 0 ;
for (@prgs){
`.\\perl -I../lib $switch $tmpfile 2>&1` :
$Is_NetWare ?
`perl -I../lib $switch $tmpfile 2>&1` :
- $Is_MacOS ?
- `$^X -I::lib -MMac::err=unix $switch $tmpfile` :
`./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# check <> pseudoliteral
-if ($^O eq 'MacOS') {
- open(try,"Dev:Null") || (die "Can't open /dev/null.");
-} else {
- open(try, "/dev/null") || open(try,"nla0:") || (die "Can't open /dev/null.");
-}
+open(try, "/dev/null") || open(try,"nla0:") || (die "Can't open /dev/null.");
if (<try> eq '') {
print "ok 6\n";
$out = (($^O eq 'MSWin32') || $^O eq 'NetWare') ? `type $filename`
: ($^O eq 'VMS') ? `type $filename.;0` # otherwise .LIS is assumed
- : ($^O eq 'MacOS') ? `catenate $filename`
: `cat $filename`;
like($out, qr/.*\n.*\n.*\n$/);
eval "use lib 1.01";
isnt ($@, '');
-
eval "use lib 0.9 qw(fred)";
is ($@, '');
-if ($^O eq 'MacOS') {
- is($INC[0], ":fred:");
-} else {
- is($INC[0], "fred");
-}
+is($INC[0], "fred");
eval "use lib 1.0 qw(joe)";
is ($@, '');
-
-if ($^O eq 'MacOS') {
- is($INC[0], ":joe:");
-} else {
- is($INC[0], "joe");
-}
-
+is($INC[0], "joe");
eval "use lib 1.01 qw(freda)";
isnt($@, '');
-if ($^O eq 'MacOS') {
- isnt($INC[0], ":freda:");
-} else {
- isnt($INC[0], "freda");
-}
+isnt($INC[0], "freda");
{
local $lib::VERSION = 35.36;
print `$cmd`;
$cmd = sprintf "$echo 1>&2", 5;
-$cmd = sprintf $echo, 5 if $^O eq 'MacOS'; # don't know if we can do this ...
print `$cmd`;
system sprintf $echo, 6;
-if ($^O eq 'MacOS') {
- system sprintf $echo, 7;
-}
-else {
- system sprintf "$echo 1>&2", 7;
-}
+system sprintf "$echo 1>&2", 7;
close(STDOUT) or die "Could not close: $!";
close(STDERR) or die "Could not close: $!";
if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { print `type $tempfile` }
elsif ($^O eq 'VMS') { system "type $tempfile.;" } # TYPE defaults to .LIS when there is no extension
-elsif ($^O eq 'MacOS') { system "catenate $tempfile" }
-else { system "cat $tempfile" }
+else { system "cat $tempfile" }
print STDOUT "ok 8\n";
use Config;
use File::Spec::Functions;
-my $Is_MacOS = ($^O eq 'MacOS');
my $Is_VMSish = ($^O eq 'VMS');
if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
!($^O eq 'MSWin32' || $^O eq 'NetWare' ||
$^O eq 'dos' || $^O eq 'os2' ||
$^O eq 'cygwin' || $^O eq 'amigaos' ||
- $wd =~ m#$Config{afsroot}/# || $Is_MacOS
+ $wd =~ m#$Config{afsroot}/#
);
if (defined &Win32::IsWinNT && Win32::IsWinNT()) {
`if f\$search("$tmpdir.dir") .nes. "" then delete/nolog/noconfirm $tmpdir.dir;`;
`create/directory [.$tmpdir]`;
}
-elsif ($Is_MacOS) {
- rmdir "$tmpdir"; mkdir "$tmpdir";
-}
else {
`rm -f $tmpdir 2>/dev/null; mkdir $tmpdir 2>/dev/null`;
}
umask(022);
SKIP: {
- skip "bogus umask", 1 if ($^O eq 'MSWin32') || ($^O eq 'NetWare') || ($^O eq 'epoc') || $Is_MacOS;
+ skip "bogus umask", 1 if ($^O eq 'MSWin32') || ($^O eq 'NetWare') || ($^O eq 'epoc');
is((umask(0)&0777), 022, 'umask'),
}
$| = 1;
use warnings;
use Config;
-$Is_MacOS = $^O eq 'MacOS';
plan tests => 108;
is( scalar @rows, 2, ' readline, list context' );
ok( close($f), ' close' );
}
-SKIP: {
- skip "Output for |- doesn't go to shell on MacOS", 5 if $Is_MacOS;
-
+{
ok( open(my $f, '|-', <<EOC), 'open |-' );
$Perl -pe "s/^not //"
EOC
ok( close($f), ' close' );
}
-SKIP: {
- skip "Output for |- doesn't go to shell on MacOS", 5 if $Is_MacOS;
-
+{
ok( open(local $f, '|-', <<EOC), 'open local $f, "|-", ...' );
$Perl -pe "s/^not //"
EOC
require './test.pl';
}
-if ($^O eq 'dos' || $^O eq 'MacOS') {
+if ($^O eq 'dos') {
skip_all("no multitasking");
}
undef &skip;
}
-skip_all "Unhappy on MacOS" if $^O eq 'MacOS';
-
#
# ./test.pl does real evilness by jumping to a label.
# This function copies the skip from ./test, omitting the goto.
close $fh or die "Failed to close $progfile: $!\n";
chmod 0755 => $progfile or die "Failed to chmod $progfile: $!\n";
- my $command = "./$progfile";
- $command .= ' 2>&1' unless $^O eq 'MacOS';
+ my $command = "./$progfile 2>&1";
if ( $^O eq 'qnx' ) {
skip "#!./perl not supported in QNX4";
skip "#!./perl not supported in QNX4";
$| = 1;
-my $Is_MacOS = $^O eq 'MacOS';
my $tmpfile = tempfile();
my @prgs = () ;
if (@ARGV)
{ print "ARGV = [@ARGV]\n" ;
- if ($Is_MacOS) {
- @w_files = map { s#^#:lib:$pragma_name:#; $_ } @ARGV
- } else {
@w_files = map { s#^#./lib/$pragma_name/#; $_ } @ARGV
- }
}
else
{ @w_files = sort glob(catfile(curdir(), "lib", $pragma_name, "*")) }
$prog = shift @files ;
}
- # fix up some paths
- if ($Is_MacOS) {
- $prog =~ s|require "./abc(d)?";|require ":abc$1";|g;
- $prog =~ s|"\."|":"|g;
- }
-
open TEST, ">$tmpfile" or die "Cannot open >$tmpfile: $!";
print TEST q{
BEGIN {
# allow all tests to run when there are leaks
$results =~ s/Scalars leaked: \d+\n//g;
- # fix up some paths
- if ($Is_MacOS) {
- $results =~ s|:abc\.pm\b|abc.pm|g;
- $results =~ s|:abc(d)?\b|./abc$1|g;
- }
-
$expected =~ s/\n+$//;
my $prefix = ($results =~ s#^PREFIX(\n|$)##) ;
# any special options? (OPTIONS foo bar zap)
Use of -l on filehandle $fh at - line 6.
########
# doio.c [Perl_do_aexec5]
-BEGIN {
- if ($^O eq 'MacOS') {
- print <<EOM;
-SKIPPED
-# no exec on Mac OS
-EOM
- exit;
- }
-}
use warnings 'io' ;
exec "lskdjfalksdjfdjfkls","" ;
no warnings 'io' ;
Can't exec "lskdjfalksdjfdjfkls": .+
########
# doio.c [Perl_do_exec3]
-BEGIN {
- if ($^O eq 'MacOS') {
- print <<EOM;
-SKIPPED
-# no exec on Mac OS
-EOM
- exit;
- }
-}
use warnings 'io' ;
exec "lskdjfalksdjfdjfkls", "abc" ;
no warnings 'io' ;
Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
########
# doio.c [win32_execvp]
-BEGIN {
- if ($^O eq 'MacOS') {
- print <<EOM;
-SKIPPED
-# no exec on Mac OS
-EOM
- exit;
- }
-}
use warnings 'exec' ;
exec $^X, "-e0" ;
EXPECT
########
# mg.c
use warnings 'signal' ;
-if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O eq 'MacOS') {
+if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') {
print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
}
$|=1;
########
# mg.c
no warnings 'signal' ;
-if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O eq 'MacOS') {
+if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') {
print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
}
$|=1;
Hash %FRED missing the % in argument 1 of keys() at - line 3.
########
# op.c
-BEGIN {
- if ($^O eq 'MacOS') {
- print <<EOM;
-SKIPPED
-# no exec on Mac OS
-EOM
- exit;
- }
-}
use warnings 'syntax' ;
exec "$^X -e 1" ;
my $a
EXPECT
-Statement unlikely to be reached at - line 13.
+Statement unlikely to be reached at - line 4.
(Maybe you meant system() when you said exec()?)
########
# op.c
(Maybe you should just omit the defined()?)
########
# op.c
-BEGIN {
- if ($^O eq 'MacOS') {
- print <<EOM;
-SKIPPED
-# no exec on Mac OS
-EOM
- exit;
- }
-}
no warnings 'syntax' ;
exec "$^X -e 1" ;
my $a
{
local $TODO = "Why does system() block alarm() on $^O?"
- if $^O eq 'VMS' || $^O eq'MacOS' || $^O eq 'dos';
+ if $^O eq 'VMS' || $^O eq 'dos';
ok( abs($diff - 3) <= 1, " right time (waited $diff secs for 3-sec alarm)" );
}
@INC = '../lib';
$Is_VMS = $^O eq 'VMS';
$Is_MSWin32 = $^O eq 'MSWin32';
-$Is_MacOS = $^O eq 'MacOS';
$Is_NetWare = $^O eq 'NetWare';
$ENV{PERL5LIB} = "../lib" unless $Is_VMS;
`$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
- $Is_MacOS ?
- `$^X -I::lib $switch $tmpfile` :
- $Is_NetWare ?
- `perl -I../lib $switch $tmpfile 2>&1` :
- `./perl $switch $tmpfile 2>&1`;
+ $Is_NetWare ?
+ `perl -I../lib $switch $tmpfile 2>&1` :
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
plan(tests => 48);
my $IsVMS = $^O eq 'VMS';
-my $IsMacOS = $^O eq 'MacOS';
my $vms_unix_rpt = 0;
my $vms_efs = 0;
my($key) = @_;
# Make sure $ENV{'SYS$LOGIN'} is only honored on VMS.
- if( $key eq 'SYS$LOGIN' && !$IsVMS && !$IsMacOS ) {
+ if( $key eq 'SYS$LOGIN' && !$IsVMS ) {
ok( !chdir(), "chdir() on $^O ignores only \$ENV{$key} set" );
is( abs_path, $Cwd, ' abs_path() did not change' );
pass( " no need to test SYS\$LOGIN on $^O" ) for 1..7;
next if $IsVMS && $env eq 'SYS$LOGIN';
next if $IsVMS && $env eq 'HOME' && !$Config{'d_setenv'};
- unless ($IsMacOS) { # ENV on MacOS is "special" :-)
- # On VMS, %ENV is many layered.
- delete $ENV{$env} while exists $ENV{$env};
- }
+ # On VMS, %ENV is many layered.
+ delete $ENV{$env} while exists $ENV{$env};
}
# The following means we won't really be testing for non-existence,
{
clean_env;
- if (($IsVMS || $IsMacOS) && !$Config{'d_setenv'}) {
+ if ($IsVMS && !$Config{'d_setenv'}) {
pass("Can't reset HOME, so chdir() test meaningless");
} else {
ok( !chdir(), 'chdir() w/o any ENV set' );
}
$wanted_filename = $unix_mode ? '0' : '0.';
-$saved_filename = $^O eq 'MacOS' ? ':0' : './0';
+$saved_filename = './0';
cmp_ok($warns,'==',0,'no warns at start');
cmp_ok($seen,'==',1,'seen in hash while()');
close FILE;
-opendir(DIR,($^O eq 'MacOS' ? ':' : '.'));
+opendir(DIR,'.');
ok(defined(DIR),'opened current directory');
$seen = 0;
while (my $name = readdir(DIR))
my $Is_VMS = $^O eq 'VMS';
my $Is_Win32 = $^O eq 'MSWin32';
-skip_all("Tests mostly usesless on MacOS") if $^O eq 'MacOS';
-
plan(tests => 22);
my $Perl = which_perl();
map { $files{lc($_)}++ } <[.op]*>;
map { s/;.*$//; delete $files{lc($_)}; } split /[\n]/, `directory/noheading/notrailing/versions=1 [.op]`,
}
-elsif ($^O eq 'MacOS') {
- @oops = @ops = <:op:*>;
- map { $files{$_}++ } <:op:*>;
- map { delete $files{$_} } split /[\s\n]/, `echo :op:\xc5`;
-}
else {
map { $files{$_}++ } <op/*>;
map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
cmp_ok($/,'eq',"\n",'sane input record separator');
$not = '';
-if ($^O eq 'MacOS') {
- while (<jskdfjskdfj* :op:* jskdjfjkosvk*>) {
- $not = "not " unless $_ eq shift @ops;
- $not = "not at all " if $/ eq "\0";
- }
-} else {
- while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
- $not = "not " unless $_ eq shift @ops;
- $not = "not at all " if $/ eq "\0";
- }
+while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
+ $not = "not " unless $_ eq shift @ops;
+ $not = "not at all " if $/ eq "\0";
}
ok(!$not,"glob amid garbage [$not]");
cmp_ok($/,'eq',"\n",'input record separator still sane');
-$_ = $^O eq 'MacOS' ? ":op:*" : "op/*";
+$_ = "op/*";
@glops = glob $_;
cmp_ok("@glops",'eq',"@oops",'glob operator 1');
is( $ret, 'abc', 'do "abc.pl" sees return value' );
{
- my $filename = $^O eq 'MacOS' ? ':Foo:Foo.pm' : './Foo.pm';
+ my $filename = './Foo.pm';
#local @INC; # local fails on tied @INC
my @old_INC = @INC; # because local doesn't work on tied arrays
@INC = sub { $filename = 'seen'; return undef; };
$Is_Dos = $^O eq 'dos';
$Is_os2 = $^O eq 'os2';
$Is_Cygwin = $^O eq 'cygwin';
-$Is_MacOS = $^O eq 'MacOS';
$Is_MPE = $^O eq 'mpeix';
$Is_miniperl = $ENV{PERL_CORE_MINITEST};
$Is_BeOS = $^O eq 'beos';
$PERL = $ENV{PERL}
|| ($Is_NetWare ? 'perl' :
- ($Is_MacOS || $Is_VMS) ? $^X :
+ $Is_VMS ? $^X :
$Is_MSWin32 ? '.\perl' :
'./perl');
# cmd.exe will echo 'variable=value' but 4nt will echo just the value
# -- Nikola Knezevic
if ($Is_MSWin32) { like `set FOO`, qr/^(?:FOO=)?hi there$/; }
-elsif ($Is_MacOS) { ok "1 # skipped", 1; }
elsif ($Is_VMS) { is `write sys\$output f\$trnlnm("FOO")`, "hi there\n"; }
else { is `echo \$FOO`, "hi there\n"; }
SKIP: {
skip('SIGINT not safe on this platform', 5)
- if $Is_MSWin32 || $Is_NetWare || $Is_Dos || $Is_MPE || $Is_MacOS;
+ if $Is_MSWin32 || $Is_NetWare || $Is_Dos || $Is_MPE;
# the next tests are done in a subprocess because sh spits out a
# newline onto stderr when a child process kills itself with SIGINT.
# We use a pipe rather than system() because the VMS command buffer
}
# $?, $@, $$
-SKIP: {
- skip('$? + system are broken on MacPerl', 2) if $Is_MacOS;
- system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(0)"];
- is $?, 0;
- system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(1)"];
- isnt $?, 0;
-}
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(0)"];
+is $?, 0;
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(1)"];
+isnt $?, 0;
eval { die "foo\n" };
is $@, "foo\n";
elsif($Is_os2) {
$wd = Cwd::sys_cwd();
}
- elsif($Is_MacOS) {
- $wd = ':';
- }
else {
$wd = '.';
}
- my $perl = ($Is_MacOS || $Is_VMS) ? $^X : "$wd/perl";
+ my $perl = $Is_VMS ? $^X : "$wd/perl";
my $headmaybe = '';
my $middlemaybe = '';
my $tailmaybe = '';
elsif ($Is_os2) {
$script = "./show-shebang";
}
- elsif ($Is_MacOS) {
- $script = ":show-shebang";
- }
elsif ($Is_VMS) {
$script = "[]show-shebang";
}
EOF
ok close(SCRIPT) or diag $!;
ok chmod(0755, $script) or diag $!;
- $_ = ($Is_MacOS || $Is_VMS) ? `$perl $script` : `$script`;
+ $_ = $Is_VMS ? `$perl $script` : `$script`;
s/\.exe//i if $Is_Dos or $Is_Cygwin or $Is_os2;
s{./$script}{$script} if $Is_BeOS; # revert BeOS execvp() side-effect
s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl
SKIP: {
skip("%ENV manipulations fail or aren't safe on $^O", 4)
- if $Is_VMS || $Is_Dos || $Is_MacOS;
+ if $Is_VMS || $Is_Dos;
SKIP: {
skip("clearing \%ENV is not safe when running under valgrind")
{
fresh_perl_is(<<EOT,
package UNIVERSAL; sub AUTOLOAD { my \$c = shift; print "\$c \$AUTOLOAD\\n" }
-sub DESTROY {} # IO object destructor called in MacOS, because of Mac::err
package Xyz;
package main; Foo->$meth->[0]();
EOT
ok(mkdir('blurfl'));
ok(rmdir('blurfl'));
-SKIP: {
- # trailing slashes will be removed before the system call to mkdir
- # but we don't care for MacOS ...
- skip("MacOS", 4) if $^O eq 'MacOS';
- ok(mkdir('blurfl///'));
- ok(-d 'blurfl');
- ok(rmdir('blurfl///'));
- ok(!-d 'blurfl');
-}
+# trailing slashes will be removed before the system call to mkdir
+ok(mkdir('blurfl///'));
+ok(-d 'blurfl');
+ok(rmdir('blurfl///'));
+ok(!-d 'blurfl');
# test default argument
@R = sort @D;
@G = sort <op/*.t>;
-@G = sort <:op:*.t> if $^O eq 'MacOS';
if ($G[0] =~ m#.*\](\w+\.t)#i) {
# grep is to convert filespecs returned from glob under VMS to format
# identical to that returned by readdir
@G = grep(s#.*\](\w+\.t).*#op/$1#i,<op/*.t>);
}
-while (@R && @G && $G[0] eq ($^O eq 'MacOS' ? ':op:' : 'op/').$R[0]) {
+while (@R && @G && $G[0] eq 'op/'.$R[0]) {
shift(@R);
shift(@G);
}
skip("Out of memory -- increase your data/heap?", 2)
if $r =~ /Out of memory/i;
is($r, '', "64K deep recursion - no output expected");
-
- if ($^O eq 'MacOS') {
- ok(1, "$^O: \$? is unreliable");
- } else {
- is($?, 0, "64K deep recursion - no coredump expected");
- }
-
+ is($?, 0, "64K deep recursion - no coredump expected");
}
}
$Is_VMS = $^O eq 'VMS';
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
-$Is_MacOS = $^O eq 'MacOS';
$ENV{PERL5LIB} = "../lib" unless $Is_VMS;
$|=1;
`.\\perl -I../lib $switch $tmpfile 2>&1` :
$Is_NetWare ?
`perl -I../lib $switch $tmpfile 2>&1` :
- $Is_MacOS ?
- `$^X -I::lib -MMac::err=unix $switch $tmpfile` :
`./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
$Is_Cygwin = $^O eq 'cygwin';
$Is_Darwin = $^O eq 'darwin';
$Is_Dos = $^O eq 'dos';
-$Is_MacOS = $^O eq 'MacOS';
$Is_MPE = $^O eq 'mpeix';
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
SKIP: {
skip "mtime and ctime not reliable", 2
- if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_MacOS or $Is_Darwin;
+ if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_Darwin;
ok( $mtime, 'mtime' );
is( $mtime, $ctime, 'mtime == ctime' );
SKIP: {
skip "-x simply determines if a file ends in an executable suffix", 1
- if $Is_Dosish || $Is_MacOS;
+ if $Is_Dosish;
ok(-x $tmpfile, ' -x');
}
# used to be a test for $*
ok("ab\ncd\n" =~ /^cd/m);
-if ($^O eq 'os390' or $^O eq 'posix-bc' or $^O eq 'MacOS') {
+if ($^O eq 'os390' or $^O eq 'posix-bc') {
# Even with the alarm() OS/390 and BS2000 can't manage these tests
# (Perl just goes into a busy loop, luckily an interruptable one)
for (25..26) { print "not ok $_ # TODO compiler bug?\n" }
for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
if (-r $file) {
- do ($^O eq 'MacOS' ? $file : "./$file");
+ do "./$file";
exit;
}
}
$dummy = defined $&; # Now we have it...
for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
if (-r $file) {
- do ($^O eq 'MacOS' ? $file : "./$file");
+ do "./$file";
exit;
}
}
}
}
-my $Is_MacOS = $^O eq 'MacOS';
my $Is_VMS = $^O eq 'VMS';
my $Is_MSWin32 = $^O eq 'MSWin32';
my $Is_NetWare = $^O eq 'NetWare';
my $Is_OpenBSD = $^O eq 'openbsd';
my $Invoke_Perl = $Is_VMS ? 'MCR Sys$Disk:[]Perl.exe' :
$Is_MSWin32 ? '.\perl' :
- $Is_MacOS ? ':perl' :
- $Is_NetWare ? 'perl' :
+ $Is_NetWare ? 'perl' :
'./perl' ;
my @MoreEnv = qw/IFS CDPATH ENV BASH_ENV/;
}
# We need an external program to call.
-my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : $Is_MacOS ? ":echo$$" : ($Is_NetWare ? "echo$$" : "./echo$$"));
+my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : ($Is_NetWare ? "echo$$" : "./echo$$"));
END { unlink $ECHO }
open PROG, "> $ECHO" or die "Can't create $ECHO: $!";
print PROG 'print "@ARGV\n"', "\n";
SKIP: {
skip "Environment tainting tests skipped", 4
- if $Is_MSWin32 || $Is_NetWare || $Is_VMS || $Is_Dos || $Is_MacOS;
+ if $Is_MSWin32 || $Is_NetWare || $Is_VMS || $Is_Dos;
my @vars = ('PATH', @MoreEnv);
while (my $v = $vars[0]) {
unlink($symlink);
my $sl = "/something/naughty";
# it has to be a real path on Mac OS
- $sl = MacPerl::MakePath((MacPerl::Volumes())[0]) if $Is_MacOS;
symlink($sl, $symlink) or die "symlink: $!\n";
my $readlink = readlink($symlink);
test tainted $readlink;
};
test !$@;
- SKIP: {
- skip "no exec() on MacOS Classic" if $Is_MacOS;
-
- eval {
- no warnings;
- exec("lskdfj does not exist","with","args");
- };
- test !$@;
- }
+ eval {
+ no warnings;
+ exec("lskdfj does not exist","with","args");
+ };
+ test !$@;
# If you add tests here update also the above skip block for VMS.
}
SKIP: {
# This conditional of "No tzset()" is stolen from ext/POSIX/t/time.t
skip "No tzset()", 1
- if $^O eq "MacOS" || $^O eq "VMS" || $^O eq "cygwin" ||
+ if $^O eq "VMS" || $^O eq "cygwin" ||
$^O eq "djgpp" || $^O eq "MSWin32" || $^O eq "dos" ||
$^O eq "interix";
# Just a complete test for format, including top-, left- and bottom marging
# and format detection through glob entries
-if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'MacOS' ||
+if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'dos' ||
($^O eq 'os2' and not eval '$OS2::can_fork')) {
$test = curr_test();
SKIP: {
my $INSTDIR = abs_path(dirname $0);
$INSTDIR = VMS::Filespec::unixpath($INSTDIR) if $^O eq 'VMS';
$INSTDIR =~ s#/$## if $^O eq 'VMS';
-$INSTDIR =~ s#:$## if $^O eq 'MacOS';
$INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 'pod');
-$INSTDIR =~ s#:$## if $^O eq 'MacOS';
$INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 't');
my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'),
catfile($INSTDIR, 'scripts'),
$|=1;
my $Is_VMS = $^O eq 'VMS';
-my $Is_MacOS = $^O eq 'MacOS';
my $Is_Win32 = $^O eq 'MSWin32';
# When in doubt, skip.
-skip_all("MacOS") if $Is_MacOS;
skip_all("VMS") if $Is_VMS;
skip_all("Win32") if $Is_Win32;
}
BEGIN {
- # MacOS system() doesn't have good return value
- $numtests = ($^O eq 'VMS') ? 16 : ($^O eq 'MacOS') ? 0 : 17;
+ $numtests = ($^O eq 'VMS') ? 16 : 17;
}
my $native_success = 0;
$native_success = 1 if $^O eq 'VMS';
-if ($^O ne 'MacOS') {
my $exit, $exit_arg;
$exit = run('exit');
$exit_arg = (44 & 7) if $vms_exit_mode;
is( $exit >> 8, $exit_arg, 'Changing $? in END block' );
-}
########
eval 'sub bar {print "In bar"}';
########
-system './perl -ne "print if eof" /dev/null' unless $^O eq 'MacOS'
+system './perl -ne "print if eof" /dev/null'
########
chop($file = <DATA>);
########
EXPECT
ok
########
-open(H,$^O eq 'MacOS' ? ':run:fresh_perl.t' : 'run/fresh_perl.t'); # must be in the 't' directory
+open(H,'run/fresh_perl.t'); # must be in the 't' directory
stat(H);
print "ok\n" if (-e _ and -f _ and -r _);
EXPECT
plan(4);
}
-my $Is_MacOS = $^O eq 'MacOS';
my $Is_VMS = $^O eq 'VMS';
my $lib;
-$lib = $Is_MacOS ? ':Bla:' : 'Bla';
+$lib = 'Bla';
ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
SKIP: {
skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
- $lib = $Is_MacOS ? 'Foo::Bar:' : 'Foo::Bar';
+ $lib = 'Foo::Bar';
ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
}
-$lib = $Is_MacOS ? ':Bla2:' : 'Bla2';
+$lib = 'Bla2';
fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib,
{ switches => ['-IBla2'] }, '-I');
SKIP: {
skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
- $lib = $Is_MacOS ? 'Foo::Bar2:' : 'Foo::Bar2';
+ $lib = 'Foo::Bar2';
fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
{ switches => ['-IFoo::Bar2'] }, '-I with colons');
}
my $is_mswin = $^O eq 'MSWin32';
my $is_netware = $^O eq 'NetWare';
-my $is_macos = $^O eq 'MacOS';
my $is_vms = $^O eq 'VMS';
my $is_cygwin = $^O eq 'cygwin';
$runperl = "$ENV{PERL_RUNPERL_DEBUG} $runperl";
}
unless ($args{nolib}) {
- if ($is_macos) {
- $runperl .= ' -I::lib';
- # Use UNIX style error messages instead of MPW style.
- $runperl .= ' -MMac::err=unix' if $args{stderr};
- }
- else {
- $runperl .= ' "-I../lib"'; # doublequotes because of VMS
- }
+ $runperl .= ' "-I../lib"'; # doublequotes because of VMS
}
if ($args{switches}) {
local $Level = 2;
$runperl = qq{$Perl -e "print qq(} .
$args{stdin} . q{)" | } . $runperl;
}
- elsif ($is_macos) {
- # MacOS can only do two processes under MPW at once;
- # the test itself is one; we can't do two more, so
- # write to temp file
- my $stdin = qq{$Perl -e 'print qq(} . $args{stdin} . qq{)' > teststdin; };
- if ($args{verbose}) {
- my $stdindisplay = $stdin;
- $stdindisplay =~ s/\n/\n\#/g;
- _print_stderr "# $stdindisplay\n";
- }
- `$stdin`;
- $runperl .= q{ < teststdin };
- }
else {
$runperl = qq{$Perl -e 'print qq(} .
$args{stdin} . q{)' | } . $runperl;
if (defined $args{args}) {
_quote_args(\$runperl, $args{args});
}
- $runperl .= ' 2>&1' if $args{stderr} && !$is_macos;
- $runperl .= " \xB3 Dev:Null" if !$args{stderr} && $is_macos;
+ $runperl .= ' 2>&1' if $args{stderr};
if ($args{verbose}) {
my $runperldisplay = $runperl;
$runperldisplay =~ s/\n/\n\#/g;
my $s2pcmd = [ $s2p, '-f', $script ];
my $plcmd = [ $plsed, $stdin ];
-my $switches = '';
-$switches = ['-x'] if $^O eq 'MacOS';
-
# psed: we create a local copy as linking may not work on some systems.
copy( $s2p, $psed );
push( @aux, $psed );
# run and compare
#
- $psedres = runperl( args => $sedcmd, switches => $switches );
+ $psedres = runperl( args => $sedcmd );
is( $psedres, $testcase{$tc}{expect}, "psed $tc" );
# 2nd test: run s2p
# translate the sed script to a Perl program
- my $perlprog = runperl( args => $s2pcmd, switches => $switches );
+ my $perlprog = runperl( args => $s2pcmd );
open( PP, ">$plsed" ) || goto FAIL_S2P;
print PP $perlprog;
close( PP ) || goto FAIL_S2P;
# execute generated Perl program, compare
- $s2pres = runperl( args => $plcmd, switches => $switches );
+ $s2pres = runperl( args => $plcmd );
is( $s2pres, $testcase{$tc}{expect}, "s2p $tc" );
next;