Skip Menu |

This queue is for tickets about the Test-Warn CPAN distribution.

Report information
The Basics
Id: 21545
Status: resolved
Priority: 0/
Queue: Test-Warn

People
Owner: Nobody in particular
Requestors: link [...] redbrick.dcu.ie
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.11_01



Subject: Directories with spaces cause test failures
Tests pass in the warning without the filename and the module matches against any filename/line number but the match fails if the file has spaces eg c:\document and setting\me\Something.pm. I think the problem is at line 318. my $cmp = $got_msg =~ /^\Q$exp_msg\E at \S+ line \d+\.?$/;
Hi! This bug caused a test to fail (unsurprisingly) on my windows box today at work. Obviously this would be more common in windows as the /home location has a space in it (C:/Documents and Settings.) I am including a small patch that should fix the issue. Please consider accepting the patch. Thanks so much! -fREW
--- Warn.pm 2009-05-20 21:58:52.000000000 -0500 +++ NewWarn.pm 2009-05-20 21:58:47.000000000 -0500 @@ -315,7 +315,7 @@ my ($got_kind, $got_msg) = %{ shift() }; my ($exp_kind, $exp_msg) = %{ shift() }; return 0 if ($got_kind eq 'warn') && ($exp_kind eq 'carped'); - my $cmp = $got_msg =~ /^\Q$exp_msg\E at (.+) line \d+\.?$/; + my $cmp = $got_msg =~ /^\Q$exp_msg\E at \S+ line \d+\.?$/; return $cmp; }
fixed in 11_01 -- Alexandr Ciornii, http://chorny.net