Skip Menu |

This queue is for tickets about the Perl6-Slurp CPAN distribution.

Report information
The Basics
Id: 15074
Status: open
Priority: 0/
Queue: Perl6-Slurp

People
Owner: Nobody in particular
Requestors: frank [...] planet-interview.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: t/errors.t fails (it assumes english locale)
t/errors.t fails, because it assumes an english locale. doro:~/.cpan/build/Perl6-Slurp-0.03# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/chomp............ok t/errors...........NOK 3 # Failed test 'shouldn't be able to slurp non-existent file' # in t/errors.t at line 17. # 'Can't open 'non-existent file': Datei oder Verzeichnis nicht gefunden at t/errors.t line 17 # ' # doesn't match '(?-xism:^Can't open 'non-existent file': No such file or directory)' # Looks like you failed 1 test of 4. t/errors...........dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 3 Failed 1/4 tests, 75.00% okay t/filehandle.......ok t/filename.........ok t/ioderfile........ok t/iofile...........ok t/ipc..............ok t/irs..............ok t/layers...........ok t/lexfilehandle....ok t/string...........ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/errors.t 1 256 4 1 25.00% 3 Failed 1/11 test scripts, 90.91% okay. 1/171 subtests failed, 99.42% okay. make: *** [test_dynamic] Fehler 255 Patch: --- errors.t 2005-10-15 19:53:15.000000000 +0200 +++ errors.t.new 2005-10-15 19:53:39.000000000 +0200 @@ -17,7 +17,7 @@ eval{slurp "non-existent file"} ? ok 0, $desc : like $@, - qr/^Can't open 'non-existent file': No such file or directory/, + qr/^Can't open 'non-existent file'/, $desc; #diag $!+0;
Subject: [PATCH] t/errors.t fails (it assumes english locale)
Le 2005-10-15 19:57:11, guest a écrit : Show quoted text
> t/errors.t fails, because it assumes an english locale.
Confirming on Ubuntu with french locale. Patch attached. -- Olivier Mengué - http://perlresume.org/DOLMEN
Subject: RT15074.patch
--- t/errors.t.orig 2012-02-08 10:55:58.883041962 +0100 +++ t/errors.t 2012-02-08 10:56:42.533041972 +0100 @@ -17,7 +17,7 @@ eval{slurp "non-existent file"} ? ok 0, $desc : like $@, - qr/^Can't open 'non-existent file': No such file or directory/, + qr/^\QCan't open 'non-existent file': $!/, $desc; TEST "shouldn't be able to read from unreadable filehandle";
Subject: [PATCH] t/errors.t fails (it assumes english locale)
Le 2012-02-08 11:00:00, DOLMEN a écrit : Show quoted text
> Le 2005-10-15 19:57:11, guest a écrit :
> > t/errors.t fails, because it assumes an english locale.
Attaching a stricter patch that checks that $! is set to ENOENT. -- Olivier Mengué - http://perlresume.org/DOLMEN
Subject: RT15074-2.patch
--- t/errors.t.orig 2012-02-08 10:55:58.883041962 +0100 +++ t/errors.t 2012-02-08 11:09:42.433042153 +0100 @@ -1,6 +1,8 @@ use Test::More "no_plan"; BEGIN {use_ok(Perl6::Slurp)}; +use Errno 'ENOENT'; + my $desc; sub TEST { $desc = $_[0] }; @@ -14,12 +16,17 @@ TEST "shouldn't be able to slurp non-existent file"; +my $ENOENT = do { local $!; $! = ENOENT; "$!" }; +is $!, '', '$! clear'; + eval{slurp "non-existent file"} ? ok 0, $desc : like $@, - qr/^Can't open 'non-existent file': No such file or directory/, + qr/^\QCan't open 'non-existent file': $ENOENT at /, $desc; +is $!, $ENOENT, '$! set to ENOENT'; + TEST "shouldn't be able to read from unreadable filehandle"; open *FILE, ">-";
Subject: Re: [rt.cpan.org #15074] [PATCH] t/errors.t fails (it assumes english locale)
Date: Thu, 9 Feb 2012 06:47:12 +1100
To: bug-Perl6-Slurp [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Many thanks, Olivier. A new version of Perl6::Slurp that fixes the bug will be uploaded today. Much appreciated! Damian
On 2012-02-08 14:47:59, damian@conway.org wrote: Show quoted text
> Many thanks, Olivier. > > A new version of Perl6::Slurp that fixes the bug > will be uploaded today. > > Much appreciated! > > Damian
I think this old bug report may be closed and marked as "resolved".