Skip Menu |

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

Report information
The Basics
Id: 62839
Status: open
Priority: 0/
Queue: Test-AutoLoader

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

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



Subject: test failure with locale
Test-AutoLoader-0.03-xGL09E> make test PERL_DL_NONLAZY=1 /home/daxim/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00basic.t .. 1/54 Subroutine load_imports redefined at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/load_imports.al) line 759. t/00basic.t .. 4/54 Subroutine strcpy redefined at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/strcpy.al) line 526. # Failed test 'subtest 'Autoload of POSIX (listed subroutines)' of 'Standard-distribution, bad subroutine name' compare diag' # at t/00basic.t line 68. # Got diag (77 bytes): # ' couldn't load no_such_function.al: Datei oder Verzeichnis nicht gefunden' # Expected diag (65 bytes): # ' couldn't load no_such_function.al: No such file or directory' # Failed test 'subtest 'Autoload of TestBusted2 (listed subroutines)' of 'File-reading errors' compare diag' # at t/00basic.t line 68. # Got diag (169 bytes): # ' couldn't load no_ready.al: Keine Berechtigung' # ' couldn't load nobody_home.al: Datei oder Verzeichnis nicht gefunden' # ' couldn't load empty.al: false return value' # Expected diag (156 bytes): # ' couldn't load no_ready.al: Permission denied' # ' couldn't load nobody_home.al: No such file or directory' # ' couldn't load empty.al: false return value' # Looks like you planned 54 tests but ran 64. # Looks like you failed 2 tests of 64 run. t/00basic.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/54 subtests Test Summary Report ------------------- t/00basic.t (Wstat: 512 Tests: 64 Failed: 12) Failed tests: 21, 51, 55-64 Non-zero exit status: 2 Parse errors: Bad plan. You planned 54 tests but ran 64. Files=1, Tests=64, 1 wallclock secs ( 0.08 usr 0.02 sys + 0.27 cusr 0.04 csys = 0.41 CPU) Result: FAIL Failed 1/1 test programs. 12/64 subtests failed. make: *** [test_dynamic] Fehler 2
From: ntyni [...] iki.fi
On Mon Nov 08 05:50:09 2010, DAXIM wrote: Show quoted text
> Test-AutoLoader-0.03-xGL09E> make test
Show quoted text
> # Got diag (77 bytes): > # ' couldn't load no_such_function.al: Datei oder Verzeichnis nicht > gefunden' > # Expected diag (65 bytes): > # ' couldn't load no_such_function.al: No such file or directory'
Hi, I'm attaching a trivial patch for this.
Subject: 0001-Set-the-locale-to-C-for-the-test-suite.patch
From 521fbef96c187d3823d708d9c83aa308455b3e1c Mon Sep 17 00:00:00 2001 From: Niko Tyni <ntyni@debian.org> Date: Mon, 7 Dec 2015 22:48:27 +0200 Subject: [PATCH] Set the locale to C for the test suite This fixes the tests under non-English locales, where the hardcoded error messages don't apply. Bug: https://rt.cpan.org/Public/Bug/Display.html?id=62839 --- t/00basic.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/00basic.t b/t/00basic.t index ec74791..a0a664c 100644 --- a/t/00basic.t +++ b/t/00basic.t @@ -23,6 +23,8 @@ if ($NO_TEST_TESTER) { exit(0); } +# $file_errors below hardcodes English error messages +setlocale(LC_ALL, 'C'); require File::Spec; -- 2.6.2