On Wed, 11 Jul 2007, Sébastien Aperghis-Tramoni wrote:
> RobMay wrote:
> > On Jul 11, 1:11 pm, demer... gmail.com (Demerphq)
wrote:
> >> I dont recall ever seeing a domain that was
non alphanumeric, but
> >> that
> >> doesnt mean anything.
> >
> > MS Knowledgebase article lists the allowed
characters for a Netbios
> > host name (which I *think* has the same
restrictions):
> > http://support
.microsoft.com/kb/188997
> >
> > So,
> >
> > /^[a-zA-Z0-9 #$%^&()-_'{}.~]$/
> >
> > I suspect that I missed some meta-characters that
need escaping.
> > There's also probably some character classes that
do this better.
>
> Thanks for the check. I wouldn't have guessed so many
characters were
> allowed.
> Updated test attached.
Thanks, I've added it with minor tweaks (skip if Test::More
is missing,
don't test Win32: omainNam
e on Win9X) to Win32-0.31 on CPAN.
Win32-0.31 also contains all the Cygwin related changes from
bleadperl.
I did some further changes to the GetLongPathName test to
generalize
the uppercasing of the drive letter to other drives beyond
'C:'.
I also noticed that Cygwin doesn't find the mixed case
system environment
variables, so I changed to the uppercase version that seems
to work
everywhere.
Steve, I assume you'll want to integrate from the CPAN
version (don't
forget to modify MANIFERST to add ext/Win32/t/Names.t). Let
me know if
you want to get a patch instead.
Cheers,
-Jan
--- users/jand/Win32/t/GetLongPathName.t.~1~ Mon Sep 10
16:20:01 2007
+++ users/jand/Win32/t/GetLongPathName.t Mon Sep 10 16:20:01
2007
 -29,17
+29,17 
//././
);
-my $drive = $ENV;
+my $drive = $ENV;
if ($drive) {
for ( paths) {
s/^c:/$drive/;
}
- push paths, $ENV if $ENV;
+ push paths, $ENV if $ENV;
}
my %expect;
expect{ paths} = map { my $x = $_;
$x =~ s,(.[/\])[/\]+,$1,g;
- $x =~ s,^c,C,;
+ $x =~ s,^(w):,U$1:,;
$x } paths;
plan tests => scalar( paths);
End of Patch.
|