| 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 | |
| 8 | plan tests => 4; |
| 9 | |
| 10 | ok 1, 1, "Loaded"; |
| 11 | |
| 12 | my $num_keys = keys %ENV; |
| 13 | File::Spec->tmpdir; |
| 14 | ok scalar keys %ENV, $num_keys, "tmpdir() shouldn't change the contents of %ENV"; |
| 15 | |
| 16 | if ($^O eq 'VMS') { |
| 17 | skip("Can't make list assignment to %ENV on this system", 1); |
| 18 | } else { |
| 19 | local %ENV; |
| 20 | File::Spec::Win32->tmpdir; |
| 21 | ok scalar keys %ENV, 0, "Win32->tmpdir() shouldn't change the contents of %ENV"; |
| 22 | } |
| 23 | |
| 24 | File::Spec::Win32->tmpdir; |
| 25 | ok scalar keys %ENV, $num_keys, "Win32->tmpdir() shouldn't change the contents of %ENV"; |