Subject: | Text-RecordParser 1.1.0, win32, test failure, 02-filename-fh.t, patch |
File t\02-filename-fh.t interpolates a path into a regex without
escaping it. This causes failures on win32 due to path seperators being
"\" instead of "/".
The following 4 line patch to t\02-filename-fh.t causes the tests to pass.
91c91
< throws_ok { my $data = $p->fh } qr/Cannot read '$filename'/,
---
Show quoted text
> throws_ok { my $data = $p->fh } qr/Cannot read '\Q$filename\E'/,
This is perl 5.8.8 built with GNU gcc (mingw) 3.4.5 on WinXP SP2.
Below is the error message...
t\02-filename-fh....ok 1/41Unrecognized escape \T passed through in
regex; marked by <-- HERE in m/Cannot read 'C:\WINDOWS\T <-- HERE
EMP\uh8SxZWiFn'/ at t\02-filename-fh.t line 91.
Unrecognized escape \u passed through in regex; marked by <-- HERE in
m/Cannot read 'C:\WINDOWS\TEMP\u <-- HERE h8SxZWiFn'/ at
t\02-filename-fh.t line 91.
t\02-filename-fh....NOK 12# Failed test 'fh dies on bad file'
# in t\02-filename-fh.t at line 91.
# expecting: Regexp ((?-xism:Cannot read 'C:\WINDOWS\TEMP\uh8SxZWiFn'))
# found: Cannot read 'C:\WINDOWS\TEMP\uh8SxZWiFn': No such file or
directory at
c:/vanilla-perl/perl/site/lib/Test/Exception.pm line 226
# Looks like you failed 1 test of 41.
t\02-filename-fh....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 12
Failed 1/41 tests, 97.56% okay