This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #127760] skip the Win32 UNC path tests on Win2k and older
authorTony Cook <tony@develop-help.com>
Wed, 30 Mar 2016 04:39:11 +0000 (15:39 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 4 Apr 2016 04:21:55 +0000 (14:21 +1000)
Windows 2000 doesn't seem to support a UNC path as a current
directory - setting the current directory to a UNC path and then
trying to stat(".") results in a file not found or similar error.

This does work on Windows XP and later.

cpan/File-Path/t/Path_win32.t

index c2b2f28..4716882 100644 (file)
@@ -7,6 +7,9 @@ use Cwd;
 use File::Spec::Functions;
 
 plan skip_all  => 'not win32' unless $^O eq 'MSWin32';
+my ($ignore, $major, $minor, $build, $id) = Win32::GetOSVersion();
+plan skip_all  => "WinXP or later"
+     unless $id >= 2 && ($major > 5 || $major == 5 && $minor >= 1);
 plan tests     => 3;
 
 my $tmp_base = catdir(