7 plan skip_all => "Tests only apply on MSWin32"
8 unless $^O eq "MSWin32";
12 # [perl #126755] previous the bad drive tests would crash
13 $Config{ccflags} =~ /(?:\A|\s)-DPERL_IMPLICIT_SYS\b/
14 or skip "need implicit_sys for this test", 1;
16 or skip "Can't load Encode", 1;
17 for my $letter ("A" .. "Z", "a" .. "z") {
18 my $good_drive = $letter . ":";
19 my $result = PerlDir_mapA($good_drive);
20 like($result, qr/^$letter:\\/i, "check good drive $letter");
22 my $wgood_drive = encode("UTF-16LE", $good_drive . "\0");
23 $result = PerlDir_mapW($wgood_drive);
24 like(decode("UTF16-LE", $result), qr/^$letter:\\/i,
25 "check a good drive (wide)");
27 for my $bad ('@', '[', '!', '~', '`', '{') {
28 my $bad_drive = "$bad:";
29 my $result = PerlDir_mapA($bad_drive);
30 is($result, $bad_drive, "check bad drive $bad:");
32 my $wbad_drive = encode("UTF-16LE", $bad_drive . "\0");
33 $result = PerlDir_mapW($wbad_drive);
34 is(decode("UTF16-LE", $result), "$bad_drive\0",
35 "check bad drive $bad: (wide)");
38 my (undef, $major, $minor)= Win32::GetOSVersion();
39 if ($major >= 5 && $minor >= 1) { #atleast XP, 2K only has V5
40 #this is testing the current state of things, specifically manifest stuff
41 #this test can be changed if perls relationship to comctl32.dll changes
42 ok((Comctl32Version())[0] >= 6,'comctl32.dll is atleast version 6')