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