diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-09-08 08:41:38 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-09-08 11:27:21 +0200 |
commit | 7b903762ad0ebd5d0459692ad5c081c69a3c0808 (patch) | |
tree | 6e64cf76feca7527bf3a0b2ab962572023e5887e /t/io | |
parent | a34ce875bf70f00f7af4a549f8c1ff0f4469f7fb (diff) | |
download | perl-7b903762ad0ebd5d0459692ad5c081c69a3c0808.tar.gz |
Remove code specific to MacOS Classic from core tests
Diffstat (limited to 't/io')
-rw-r--r-- | t/io/dup.t | 11 | ||||
-rw-r--r-- | t/io/fs.t | 8 | ||||
-rw-r--r-- | t/io/open.t | 9 | ||||
-rw-r--r-- | t/io/openpid.t | 2 |
4 files changed, 7 insertions, 23 deletions
diff --git a/t/io/dup.t b/t/io/dup.t index ac2f3f465d..1328aebcd4 100644 --- a/t/io/dup.t +++ b/t/io/dup.t @@ -35,16 +35,10 @@ $cmd = sprintf $echo, 4; 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: $!"; @@ -54,8 +48,7 @@ open(STDERR,">&DUPERR") or die "Could not open: $!"; 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"; @@ -9,7 +9,6 @@ BEGIN { 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')) { @@ -28,7 +27,7 @@ my $accurate_timestamps = !($^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()) { @@ -63,9 +62,6 @@ elsif ($^O eq 'VMS') { `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`; } @@ -77,7 +73,7 @@ chdir catdir(curdir(), $tmpdir); 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'), } diff --git a/t/io/open.t b/t/io/open.t index 325d637e9e..1a5832747d 100644 --- a/t/io/open.t +++ b/t/io/open.t @@ -9,7 +9,6 @@ BEGIN { $| = 1; use warnings; use Config; -$Is_MacOS = $^O eq 'MacOS'; plan tests => 108; @@ -84,9 +83,7 @@ EOC 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 @@ -177,9 +174,7 @@ 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 diff --git a/t/io/openpid.t b/t/io/openpid.t index 449a268d96..7503f34975 100644 --- a/t/io/openpid.t +++ b/t/io/openpid.t @@ -13,7 +13,7 @@ BEGIN { require './test.pl'; } -if ($^O eq 'dos' || $^O eq 'MacOS') { +if ($^O eq 'dos') { skip_all("no multitasking"); } |