ext/Unicode/Normalize/t/tie.t Unicode::Normalize
ext/util/make_ext Used by Makefile to execute extension Makefiles
ext/Win32/Makefile.PL Win32 extension makefile writer
+ext/Win32/t/ExpandEnvironmentStrings.t See if Win32 extension works
+ext/Win32/t/GetFileVersion.t See if Win32 extension works
+ext/Win32/t/GetFolderPath.t See if Win32 extension works
+ext/Win32/t/GetFullPathName.t See if Win32 extension works
+ext/Win32/t/GetLongPathName.t See if Win32 extension works
+ext/Win32/t/GetOSVersion.t See if Win32 extension works
+ext/Win32/t/GuidGen.t See if Win32 extension works
ext/Win32/Win32.pm Win32 extension Perl module
ext/Win32/Win32.xs Win32 extension external subroutines
ext/Win32API/File/buffers.h Win32API::File extension
t/uni/tr_utf8.t See if Unicode tr/// in utf8 works
t/uni/upper.t See if Unicode casing works
t/uni/write.t See if Unicode formats work
-t/win32/getosversion.t Test if Win32::GetOSVersion() works
-t/win32/longpath.t Test if Win32::GetLongPathName() works
t/win32/system.t See if system works in Win*
t/win32/system_tests Test runner for system.t
t/x2p/s2p.t See if s2p/psed work
--- /dev/null
+use strict;
+use Test;
+use Win32;
+
+plan tests => 1;
+
+ok(Win32::ExpandEnvironmentStrings("%WINDIR%"), $ENV{WINDIR});
--- /dev/null
+use strict;
+use Test;
+use Win32;
+
+unless (defined &Win32::BuildNumber) {
+ print "1..0 # Skip: Only ActivePerl seems to set the perl.exe fileversion\n";
+ exit;
+}
+
+plan tests => 2;
+
+my @version = Win32::GetFileVersion($^X);
+my $version = $version[0] + $version[1] / 1000 + $version[2] / 1000000;
+
+ok($version, $]);
+ok($version[3], Win32::BuildNumber());
--- /dev/null
+use strict;
+use Test;
+use Win32;
+
+plan tests => 1;
+
+# "windir" exists back to Win9X; "SystemRoot" only exists on WinNT and later.
+ok(Win32::GetFolderPath(Win32::CSIDL_WINDOWS), $ENV{WINDIR});
--- /dev/null
+use strict;
+use Test;
+use Win32;
+
+plan tests => 16;
+
+my $cwd = Win32::GetCwd;
+my @cwd = split/\\/, $cwd;
+my $file = pop @cwd;
+my $dir = join('\\', @cwd);
+
+ok(scalar Win32::GetFullPathName('.'), $cwd);
+ok((Win32::GetFullPathName('.'))[0], "$dir\\");
+ok((Win32::GetFullPathName('.'))[1], $file);
+
+ok((Win32::GetFullPathName('./'))[0], "$cwd\\");
+ok((Win32::GetFullPathName('.\\'))[0], "$cwd\\");
+ok((Win32::GetFullPathName('./'))[1], "");
+
+ok(scalar Win32::GetFullPathName($cwd), $cwd);
+ok((Win32::GetFullPathName($cwd))[0], "$dir\\");
+ok((Win32::GetFullPathName($cwd))[1], $file);
+
+ok(scalar Win32::GetFullPathName(substr($cwd,2)), $cwd);
+ok((Win32::GetFullPathName(substr($cwd,2)))[0], "$dir\\");
+ok((Win32::GetFullPathName(substr($cwd,2)))[1], $file);
+
+ok(scalar Win32::GetFullPathName('/Foo Bar/'), substr($cwd,0,2)."\\Foo Bar\\");
+
+chdir($dir);
+ok(scalar Win32::GetFullPathName('.'), $dir);
+
+ok((Win32::GetFullPathName($file))[0], "$dir\\");
+ok((Win32::GetFullPathName($file))[1], $file);
-#!perl -w
-
-# tests for Win32::GetLongPathName()
-
-$^O =~ /^MSWin/ or print("1..0 # not win32\n" ), exit;
+use strict;
+use Test;
+use Win32;
my @paths = qw(
/
my %expect;
@expect{@paths} = map { my $x = $_; $x =~ s,(.[/\\])[/\\]+,$1,g; $x } @paths;
-print "1.." . @paths . "\n";
+plan tests => scalar(@paths);
+
my $i = 1;
for (@paths) {
my $got = Win32::GetLongPathName($_);
-#!perl -w
+use strict;
+use Test;
+use Win32;
-# tests for Win32::GetOSVersion()
-
-$^O =~ /^MSWin/ or print("1..0 # not win32\n" ), exit;
-
-print "1..1\n";
+plan tests => 1;
my $scalar = Win32::GetOSVersion();
my @array = Win32::GetOSVersion();
--- /dev/null
+use strict;
+use Test;
+use Win32;
+
+plan tests => 3;
+
+my $guid1 = Win32::GuidGen();
+my $guid2 = Win32::GuidGen();
+
+# {FB9586CD-273B-43BE-A20C-485A6BD4FCD6}
+ok($guid1, qr/^{\w{8}(-\w{4}){3}-\w{12}}$/);
+ok($guid2, qr/^{\w{8}(-\w{4}){3}-\w{12}}$/);
+
+# Every GUID is unique
+ok($guid1 ne $guid2);