Commit | Line | Data |
9d5071ba |
1 | use strict; |
2 | use Test; |
3 | |
4 | # Grab all of the plain routines from File::Spec |
5 | use File::Spec; |
6 | use File::Spec::Win32; |
7 | |
dfa4e5d3 |
8 | plan tests => 4; |
9d5071ba |
9 | |
10 | ok 1, 1, "Loaded"; |
11 | |
ae5a807c |
12 | if ($^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 |
18 | my $num_keys = keys %ENV; |
19 | File::Spec->tmpdir; |
20 | ok scalar keys %ENV, $num_keys, "tmpdir() shouldn't change the contents of %ENV"; |
21 | |
3eb182fc |
22 | if ($^O eq 'VMS') { |
bf7c0a3d |
23 | skip("Can't make list assignment to %ENV on this system", 1); |
24 | } else { |
dfa4e5d3 |
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 |
30 | File::Spec::Win32->tmpdir; |
31 | ok scalar keys %ENV, $num_keys, "Win32->tmpdir() shouldn't change the contents of %ENV"; |