Skip Menu |

This queue is for tickets about the XML-Twig CPAN distribution.

Report information
The Basics
Id: 19083
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: lars.dieckow [...] net-m.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.23
Fixed in: 3.24



Subject: test_bugs_3.22 #46 fails under locale
Summary: Test #46 in test_bugs_3.22 from XML::Twig 3.23 fails when running under non-English locale due to comparisons with hardcoded error messages in English. Failure: t/test_bugs_3.22....................NOK 46unsupported encoding: expected to match /^(Unsupported encoding: a_non_existent_encoding_ bwaaahhh|Text::Iconv not available|Can't locate)/, got 'Unsupported conversion: Das Argument ist ungültig at (eval 17) line 3. BEGIN failed--compilation aborted at (eval 17) line 5. at t/test_bugs_3.22.t line 113 ' t/test_bugs_3.22....................FAILED test 46 Configuration: perl: 5.008007 OS: linux - i686-linux XML::Parser : 2.34 (required) expat : 1.95.8 (required) Scalar::Util : 1.18 (for improved memory management) Encode : 2.15 (for encoding conversions) LWP : 5.805 (for the parseurl method) HTML::Entities : 1.35 (for the html_encode filter) Tie::IxHash : 1.21 (for the keep_atts_order option) XML::XPath : 1.13 (to use XML::Twig::XPath) HTML::TreeBuilder : 3.13 (to use parse_html and parsefile_html) Text::Wrap : 2005.0824 (to use the "wrapped" option for pretty_print) Test : 1.25 (for testing purposes) Test::Pod : 1.24 (for testing purposes) XML::Simple : 2.14 (for testing purposes) XML::Handler::YAWriter : 0.23 (for testing purposes) XML::SAX::Writer : <not available> (for testing purposes) XML::Filter::BufferText : 1.01 (for testing purposes) IO::Scalar : 2.110 (for testing purposes) localhost:> perl -v|head -2 This is perl, v5.8.7 built for i586-linux-thread-multi localhost:> uname -a Linux localhost 2.6.13-15.8-default #1 Tue Feb 7 11:07:24 UTC 2006 i686 athlon i386 GNU/Linux localhost:> locale|head -1 LANG=de_DE.UTF-8 localhost:> iconv --version|head -1 iconv (GNU libc) 2.3.5 localhost:> perl -MText::Iconv -e'print"$Text::Iconv::VERSION\n"' 1.4 The patch for the test: localhost:> diff -u test_bugs_3.22.t.old test_bugs_3.22.t --- test_bugs_3.22.t.old 2006-01-23 11:42:58.000000000 +0100 +++ test_bugs_3.22.t 2006-05-04 20:40:16.000000000 +0200 @@ -111,7 +111,7 @@ { my $enc= "a_non_existent_encoding_bwaaahhh"; eval { XML::Twig->iconv_convert( $enc); }; - matches( $@, "^(Unsupported encoding: $enc|Text::Iconv not available| Can't locate)", "unsupported encoding"); + matches( $@, "^(Unsupported encoding: $enc|Text::Iconv not available| Can't locate|Unsupported conversion)", "unsupported encoding"); } { # test comments handlers Patch for Twig.pm so that the intention of a more accurate error message is kept: localhost:> diff -u Twig.pm.old Twig.pm --- Twig.pm.old 2006-01-23 15:22:13.000000000 +0100 +++ Twig.pm 2006-05-04 20:59:48.000000000 +0200 @@ -3668,7 +3668,7 @@ } }; unless( $sub) - { if( $@=~ m{^Unsupported conversion: Invalid argument}) + { if( $@=~ m{^Unsupported conversion: }) { croak "Unsupported encoding: $enc"; } else { croak $@; }
Subject: Re: [rt.cpan.org #19083] test_bugs_3.22 #46 fails under locale
Date: Thu, 04 May 2006 21:52:01 +0200
To: bug-XML-Twig [...] rt.cpan.org
From: Michel Rodriguez <mirod [...] xmltwig.com>
Guest via RT wrote: Show quoted text
> Test #46 in test_bugs_3.22 from XML::Twig 3.23 fails when running under > non-English locale due to comparisons with hardcoded error messages in > English. > > > Failure: > > t/test_bugs_3.22....................NOK 46unsupported encoding: > expected to match /^(Unsupported encoding: a_non_existent_encoding_ > bwaaahhh|Text::Iconv not available|Can't locate)/, got 'Unsupported > conversion: Das Argument ist ungültig at (eval 17) line 3. > BEGIN failed--compilation aborted at (eval 17) line 5. > at t/test_bugs_3.22.t line 113 > '
Hi, I think this is fixed in the development version (available from http://xmltwig.com/xmltwig/) let me know if it works for you. Thanks -- Michel Rodriguez Perl &amp; XML xmltwig.com
Subject: Re: [rt.cpan.org #19083] test_bugs_3.22 #46 fails under locale
Date: Fri, 05 May 2006 11:33:53 +0200
To: bug-XML-Twig [...] rt.cpan.org
From: Lars Dieckow <lars.dieckow [...] net-m.de>
In the latest development version (Thu May 4 15:37:45 2006) of XML-Twig-3.24.tar.gz the test does not fail anymore. | All tests successful. | Files=85, Tests=4285, 57 wallclock secs (46.24 cusr + 4.40 csys = 50.64 CPU)