Shlomi,
I updated t/02parse.t by adding diag functions:
{
# This is to fix
https://rt.cpan.org/Public/Bug/Display.html?id=69248
# Testing for localised error messages.
$! = ENOENT;
my $err_string = "$!";
$! = 0;
my $re = qr/\ACould not create file parser context for file
"\Q$badfile2\E": \Q$err_string\E/;
eval { $parser->parse_file($badfile2); };
like($@, $re, "error parsing non-existent $badfile2");
diag("\$\@: |$@|");
diag("\$err_string: |$err_string|");
}
This is what I get:
C:\CPANTesters\Perl5.10.1\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/02parse.t
t/02parse.t .. 1/531
# Failed test 'error parsing non-existent does_not_exist.xml'
# at t/02parse.t line 238.
# 'Could not create file parser context for file
"does_not_exist.xml": No error at t/02parse.t line 237
# '
# doesn't match '(?-xism:\ACould not create file parser context
for file "does_not_exist\.xml": No\ such\ file\ or\ directory)'
# $@: |Could not create file parser context for file
"does_not_exist.xml": No error at t/02parse.t line 237
# |
# $err_string: |No such file or directory|
t/02parse.t .. 312/531 # Looks like you failed 1 test of 531.
t/02parse.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/531 subtests
Looks like no error is thrown. I'll look into it further...
On Tue, Jan 24, 2012 at 12:53 AM, Shlomi Fish via RT
<bug-XML-LibXML@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=69248 >
>
> Hello,
>
> On Mon Jan 23 18:23:55 2012, nyet wrote:
>> Hi, it's still borking P5.10.1 while testing
> SHLOMIF/XML-LibXML-1.90.tar.gz
>>
>> # Compiled against libxml2 version: 20708
>> # Running libxml2 version: 20708
>> #
>> t/01basic.t ......................... ok
>>
>> # Failed test 'error parsing non-existent does_not_exist.xml'
>> # at t/02parse.t line 238.
>> # 'Could not create file parser context for file
>> "does_not_exist.xml": No error at t/02parse.t line 237
>> # '
>> # doesn't match '(?-xism:\ACould not create file parser context for
>> file "does_not_exist\.xml": No\ such\ file\ or\ directory)'
>> # Looks like you failed 1 test of 531.
>
> This is not related to the locale. This time what happens is that the
> wrong error is returned. I don't know why, but it's a different issue.
>
> Can you provide more details on your system and maybe investigate what
> is happening using a debugger?
>
> Regards,
>
> -- Shlomi Fish
>
>> t/02parse.t .........................
>> Dubious, test returned 1 (wstat 256, 0x100)
>> Failed 1/531 subtests
>> t/03doc.t ........................... ok
>>
>>
>>
>>
>> On Sat Jul 02 10:25:47 2011, SHLOMIF wrote:
>> > On Sat Jul 02 08:32:15 2011, GRAF wrote:
>> > > t/01basic.t ......................... ok
>> > >
>> > > # Failed test 'error parsing non-existant does_not_exist.xml'
>> > > # at t/02parse.t line 228.
>> > > # 'Could not create file parser context for file
>> > > "does_not_exist.xml": Datei oder Verzeichnis nicht gefunden at
>> > > t/02parse.t line 227
>> > > # '
>> > > # doesn't match '(?^:^Could not create file parser context for
> file
>> > > "does_not_exist.xml": No such file or directory at)'
>> > > # Looks like you failed 1 test of 531.
>> > >
>> > > Current workaround:
>> > > LANG=C make test
>> > >
>> > > This should be done in the test.
>> > > Or better test error codes (== ENOENT) instead of a string.
>> >
>> > I added a POSIX::setlocale() call in t/02parse.t to mitigate it.
>> >
>> > This will be available in the next release.
>> >
>> > Regards,
>> >
>> > -- Shlomi Fish
>>
>>
>
>
>