This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove Mac OS classic only tests from Cwd's Spec.t
[perl5.git] / dist / Cwd / t / tmpdir.t
CommitLineData
9d5071ba
SP
1use strict;
2use Test;
3
4# Grab all of the plain routines from File::Spec
5use File::Spec;
6use File::Spec::Win32;
7
dfa4e5d3 8plan tests => 4;
9d5071ba
SP
9
10ok 1, 1, "Loaded";
11
ae5a807c
JM
12if ($^O eq 'VMS') {
13 # hack:
14 # Need to cause the %ENV to get populated or you only get the builtins at
15 # first, and then something else can cause the hash to get populated.
16 my %look_env = %ENV;
17}
9d5071ba
SP
18my $num_keys = keys %ENV;
19File::Spec->tmpdir;
20ok scalar keys %ENV, $num_keys, "tmpdir() shouldn't change the contents of %ENV";
21
3eb182fc 22if ($^O eq 'VMS') {
bf7c0a3d
SP
23 skip("Can't make list assignment to %ENV on this system", 1);
24} else {
dfa4e5d3
RGS
25 local %ENV;
26 File::Spec::Win32->tmpdir;
27 ok scalar keys %ENV, 0, "Win32->tmpdir() shouldn't change the contents of %ENV";
28}
29
9d5071ba
SP
30File::Spec::Win32->tmpdir;
31ok scalar keys %ENV, $num_keys, "Win32->tmpdir() shouldn't change the contents of %ENV";