Andy
On Fri Jan 23 02:33:09 2009, ANDK wrote:
Show quoted text> Looking through cpantesters I found that one of my smokers reported FAIL
> like so:
>
> not ok 4 - uri_unescape("%7Cabc%e5")
>
> # Failed test 'uri_unescape("%7Cabc%e5")'
> # at t/01-compat.t line 14.
> # got: '�abc]'
> # expected: '|abc�'
>
> That was in report
http://www.nntp.perl.org/group/perl.cpan.testers/3076621
I have checked the report and found:
Show quoted text> LANG = de_DE.UTF-8
I rewrote t/01-compat. it used to contain ISO-latin1 literal but I rewrote it so that it does
not contain non-ascii. Since the script is very small I have attached the whole file right after
the signature. Would you please check?
Show quoted text> I can reproduce this result but not explain it. Interestingly I cannot
> reproduce it when running the test in the debugger.
>
> Maybe it's interesting to know that the installed Unicode::Properties is
> 0.02, Unicode::UCD is 0.23. Don't know if you depend on these, I just
> discovered them as loaded in the debugger.
>
> Let me know whether/how I can provide more information.
>
> Regards,
Dan the Maintainer Thereof
# !perl -w
#
# $Id: 01-compat.t,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
#
# Original as URI-1.35/t/escape.t
#
use URI::Escape::XS qw/uri_escape uri_unescape/;
use Test::More tests => 7;
{
use bytes;
is uri_escape("|abc\xE5"), "%7Cabc%E5", qq{uri_escape("|abc?")};
is uri_escape("abc", "b-d"), "a%62%63", qq{uri_escape("abc", "b-d")};
ok !defined(uri_escape(undef)), qq{uri_escape(undef)};
is uri_unescape("%7Cabc%e5"), "|abc\xE5" , qq{uri_unescape("%7Cabc%e5")}; ;
is join(":", uri_unescape("%40A%42", "CDE", "F%47H")), '@AB:CDE:FGH',
qq{uri_unescape("%40A%42", "CDE", "F%47H")};
}
eval { my $escaped = uri_escape("abc" . chr(300)) };
ok !$@, qq{uri_escape("abc".chr(300)) does NOT croak};
is uri_escape(chr(0xFFF)), "%E0%BF%BF", qq{uri_escape(chr(0xFFF))};