Subject: | Spurious Moose 2.2000 test failure on Windows due to filename in regex pattern |
Date: | Sun, 29 Jan 2017 16:08:52 -0500 |
To: | bug-Moose [...] rt.cpan.org |
From: | "A. Sinan Unur" <nanis [...] cpan.org> |
Line 515 of t\attributes\attribute_delegation.t has this:
like(
$e,
qr{ in DelegatesToThrower for thrower->throw \(attribute
declared in $file at line \d+\)},
'stack trace tells you where delegation was defined'
);
On Windows, with MSVC compiled perl, the test fails because of the
unescaped file name that is interpolated into the pattern. The `\a` is
0x07, i.e. CTRL-G, i.e. BEL
https://en.wikipedia.org/wiki/Bell_character
The test should be written as
like(
$e,
qr{ in DelegatesToThrower for thrower->throw \(attribute
declared in \Q$file\E at line \d+\)},
'stack trace tells you where delegation was defined'
);
to avoid this issue.
Thanks.
-- Sinan