Skip Menu |

This queue is for tickets about the URI-Escape-XS CPAN distribution.

Report information
The Basics
Id: 50966
Status: resolved
Priority: 0/
Queue: URI-Escape-XS

People
Owner: Nobody in particular
Requestors: jansen [...] hbz-nrw.de
Cc:
AdminCc:

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



Subject: decodeURIComponent calls in 02-basic.t failing on Perl 5.10.1
Date: Fri, 30 Oct 2009 10:41:39 +0100
To: bug-URI-Escape-XS [...] rt.cpan.org
From: Heiko Jansen <jansen [...] hbz-nrw.de>
The decodeURIComponent() tests in t/02-basic.t fail on my machine as shown below. ~> make test PERL_DL_NONLAZY=1 /tools/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ....... 1/1 # Testing URI::Escape::XS 0.06, Perl 5.010001, /tools/bin/perl t/00-load.t ....... ok t/01-compat.t ..... ok t/02-basic.t ...... 1/512 # Failed test 'decodeURIComponent(%00)' # at t/02-basic.t line 18. # got: ' # ' # expected: '' # Failed test 'decodeURIComponent(%01)' # at t/02-basic.t line 18. # got: '▒' # expected: '' # Failed test 'decodeURIComponent(%02)' # at t/02-basic.t line 18. # got: '*' # expected: '' [...] # Failed test 'decodeURIComponent(%FE)' # at t/02-basic.t line 18. # got: '�' # expected: '�' # Failed test 'decodeURIComponent(%FF)' # at t/02-basic.t line 18. # got: '�' # expected: '�' # Looks like you failed 184 tests of 512. t/02-basic.t ...... Dubious, test returned 184 (wstat 47104, 0xb800) Failed 184/512 subtests t/03-hashu.t ...... ok t/04-idn.t ........ ok t/05-null.t ....... ok t/boilerplate.t ... ok t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.t ........... ok Test Summary Report ------------------- t/02-basic.t (Wstat: 47104 Tests: 512 Failed: 184) Failed tests: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 44, 46, 48, 50, 52, 54, 56, 58, 60, 62 64, 66, 70, 72, 74, 76, 78, 88, 90, 96 118, 120, 122, 124, 126, 128, 130, 184 186, 188, 190, 194, 248, 250, 252, 256 258, 260, 262, 264, 266, 268, 270, 272 274, 276, 278, 280, 282, 284, 286, 288 290, 292, 294, 296, 298, 300, 302, 304 306, 308, 310, 312, 314, 316, 318, 320 322, 324, 326, 328, 330, 332, 334, 336 338, 340, 344, 346, 348, 350, 352, 354 356, 358, 360, 362, 364, 366, 368, 370 372, 374, 376, 378, 380, 382, 384, 386 388, 390, 392, 394, 396, 398, 400, 402 404, 406, 408, 410, 412, 414, 416, 418 420, 422, 424, 426, 428, 430, 432, 434 436, 438, 440, 442, 444, 446, 448, 450 452, 454, 456, 458, 460, 462, 464, 466 468, 470, 472, 474, 476, 478, 480, 482 484, 486, 488, 490, 492, 494, 496, 498 500, 502, 504, 506, 508, 510, 512 Non-zero exit status: 184 Files=9, Tests=544, 1 wallclock secs ( 0.19 usr 0.06 sys + 0.80 cusr 0.08 csys = 1.13 CPU) Result: FAIL Failed 1/9 test programs. 184/544 subtests failed. make: *** [test_dynamic] Error 255 =============================================================================== The tests are successfull, if I add this: --- 02-basic.t.orig 2009-10-30 10:37:46.000000000 +0100 +++ 02-basic.t 2009-10-30 10:37:53.000000000 +0100 @@ -14,5 +14,6 @@ my $chr = chr $ord; my $esc = $chr =~ /[A-Za-z0-9\-_.!~*'()]/ ? $chr : sprintf "%%%02X", $ord; is encodeURIComponent($chr) => $esc, "encodeURIComponent(ord $ord)"; + my $x = decodeURIComponent($esc); is decodeURIComponent($esc) => $chr, "decodeURIComponent($esc)" } Hope this helps with finding/fixing the problem! Heiko =============================================================================== locale: LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= or LANG= LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=C makes no difference. =============================================================================== Linux aietes 2.6.16.60-0.39.3-smp #1 SMP Mon May 11 11:46:34 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux =============================================================================== ~> gcc -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info -- mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable- checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 -- with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix= --enable-version-specific- runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux Thread model: posix gcc version 4.1.2 20070115 (SUSE Linux) =============================================================================== Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.16.60-0.39.3-smp, archname=x86_64-linux-thread-multi-ld uname='linux aietes 2.6.16.60-0.39.3-smp #1 smp mon may 11 11:46:34 utc 2009 x86_64 x86_64 x86_64 gnulinux ' config_args='' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/tools/include -I/usr/local/include - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/tools/include -I/usr/local/include' ccversion='', gccversion='4.1.2 20070115 (SUSE Linux)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8 alignbytes=16, prototype=define Linker and Libraries: ld='cc', ldflags ='-fstack-protector -L/tools/lib -L/usr/local/lib64 -L/usr/local/lib' libpth=/tools/lib /usr/local/lib64 /usr/local/lib /lib64 /lib /usr/lib64 /usr/lib libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/tools/lib/perl5/5.10.1/x86_64-linux-thread-multi- ld/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/tools/lib -L/usr/local/lib64 -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LONG_DOUBLE USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Sep 17 2009 17:44:58 @INC: /tools/lib/perl5/5.10.1/x86_64-linux-thread-multi-ld /tools/lib/perl5/5.10.1 /tools/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi-ld /tools/lib/perl5/site_perl/5.10.1 /tools/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi-ld /tools/lib/perl5/site_perl/5.10.0 /tools/lib/perl5/site_perl .
It should have been fixed in the current version (0.08). Dan the Maintainer Thereof On Fri Oct 30 05:42:25 2009, jansen@hbz-nrw.de wrote: Show quoted text
> The decodeURIComponent() tests in t/02-basic.t fail on my machine as > shown below. > > ~> make test > PERL_DL_NONLAZY=1 /tools/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00-load.t ....... 1/1 # Testing URI::Escape::XS 0.06, Perl 5.010001, > /tools/bin/perl > t/00-load.t ....... ok > t/01-compat.t ..... ok > t/02-basic.t ...... 1/512 > # Failed test 'decodeURIComponent(%00)' > # at t/02-basic.t line 18. > # got: ' > # ' > # expected: '' > > # Failed test 'decodeURIComponent(%01)' > # at t/02-basic.t line 18. > # got: '▒' > # expected: '' > > # Failed test 'decodeURIComponent(%02)' > # at t/02-basic.t line 18. > # got: '*' > # expected: '' > > [...] > > # Failed test 'decodeURIComponent(%FE)' > # at t/02-basic.t line 18. > # got: '�' > # expected: '�' > > # Failed test 'decodeURIComponent(%FF)' > # at t/02-basic.t line 18. > # got: '�' > # expected: '�' > # Looks like you failed 184 tests of 512. > t/02-basic.t ...... Dubious, test returned 184 (wstat 47104, 0xb800) > Failed 184/512 subtests > t/03-hashu.t ...... ok > t/04-idn.t ........ ok > t/05-null.t ....... ok > t/boilerplate.t ... ok > t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.04 required for > testing POD coverage > t/pod.t ........... ok > > Test Summary Report > ------------------- > t/02-basic.t (Wstat: 47104 Tests: 512 Failed: 184) > Failed tests: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 > 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 > 44, 46, 48, 50, 52, 54, 56, 58, 60, 62 > 64, 66, 70, 72, 74, 76, 78, 88, 90, 96 > 118, 120, 122, 124, 126, 128, 130, 184 > 186, 188, 190, 194, 248, 250, 252, 256 > 258, 260, 262, 264, 266, 268, 270, 272 > 274, 276, 278, 280, 282, 284, 286, 288 > 290, 292, 294, 296, 298, 300, 302, 304 > 306, 308, 310, 312, 314, 316, 318, 320 > 322, 324, 326, 328, 330, 332, 334, 336 > 338, 340, 344, 346, 348, 350, 352, 354 > 356, 358, 360, 362, 364, 366, 368, 370 > 372, 374, 376, 378, 380, 382, 384, 386 > 388, 390, 392, 394, 396, 398, 400, 402 > 404, 406, 408, 410, 412, 414, 416, 418 > 420, 422, 424, 426, 428, 430, 432, 434 > 436, 438, 440, 442, 444, 446, 448, 450 > 452, 454, 456, 458, 460, 462, 464, 466 > 468, 470, 472, 474, 476, 478, 480, 482 > 484, 486, 488, 490, 492, 494, 496, 498 > 500, 502, 504, 506, 508, 510, 512 > Non-zero exit status: 184 > Files=9, Tests=544, 1 wallclock secs ( 0.19 usr 0.06 sys + 0.80 > cusr 0.08 csys = 1.13 CPU) > Result: FAIL > Failed 1/9 test programs. 184/544 subtests failed. > make: *** [test_dynamic] Error 255 > >
=========================================================== ==================== Show quoted text
> > The tests are successfull, if I add this: > > --- 02-basic.t.orig 2009-10-30 10:37:46.000000000 +0100 > +++ 02-basic.t 2009-10-30 10:37:53.000000000 +0100 > @@ -14,5 +14,6 @@ > my $chr = chr $ord; > my $esc = $chr =~ /[A-Za-z0-9\-_.!~*'()]/ ? $chr : sprintf > "%%%02X", $ord; > is encodeURIComponent($chr) => $esc, "encodeURIComponent(ord > $ord)"; > + my $x = decodeURIComponent($esc); > is decodeURIComponent($esc) => $chr, "decodeURIComponent($esc)" > } > > Hope this helps with finding/fixing the problem! > Heiko > >
=========================================================== ==================== Show quoted text
> > locale: > LANG=de_DE.UTF-8 > LC_CTYPE="de_DE.UTF-8" > LC_NUMERIC="de_DE.UTF-8" > LC_TIME="de_DE.UTF-8" > LC_COLLATE="de_DE.UTF-8" > LC_MONETARY="de_DE.UTF-8" > LC_MESSAGES="de_DE.UTF-8" > LC_PAPER="de_DE.UTF-8" > LC_NAME="de_DE.UTF-8" > LC_ADDRESS="de_DE.UTF-8" > LC_TELEPHONE="de_DE.UTF-8" > LC_MEASUREMENT="de_DE.UTF-8" > LC_IDENTIFICATION="de_DE.UTF-8" > LC_ALL= > > or > > LANG= > LC_CTYPE="C" > LC_NUMERIC="C" > LC_TIME="C" > LC_COLLATE="C" > LC_MONETARY="C" > LC_MESSAGES="C" > LC_PAPER="C" > LC_NAME="C" > LC_ADDRESS="C" > LC_TELEPHONE="C" > LC_MEASUREMENT="C" > LC_IDENTIFICATION="C" > LC_ALL=C > > makes no difference. > >
=========================================================== ==================== Show quoted text
> > Linux aietes 2.6.16.60-0.39.3-smp #1 SMP Mon May 11 11:46:34 UTC 2009 > x86_64 x86_64 x86_64 GNU/Linux > >
=========================================================== ==================== Show quoted text
> > ~> gcc -v > Using built-in specs. > Target: x86_64-suse-linux > Configured with: ../configure --enable-threads=posix --prefix=/usr > --with-local-prefix=/usr/local --infodir=/usr/share/info -- > mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 > --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable- > checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 > --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 > -- > with-system-zlib --enable-shared --enable-__cxa_atexit > --enable-libstdcxx-allocator=new --program-suffix= > --enable-version-specific- > runtime-libs --without-system-libunwind --with-cpu=generic > --host=x86_64-suse-linux > Thread model: posix > gcc version 4.1.2 20070115 (SUSE Linux) > >
=========================================================== ==================== Show quoted text
> > Summary of my perl5 (revision 5 version 10 subversion 1) > configuration: > > Platform: > osname=linux, osvers=2.6.16.60-0.39.3-smp, archname=x86_64-linux- > thread-multi-ld > uname='linux aietes 2.6.16.60-0.39.3-smp #1 smp mon may 11 > 11:46:34 utc 2009 x86_64 x86_64 x86_64 gnulinux ' > config_args='' > hint=recommended, useposix=true, d_sigaction=define > useithreads=define, usemultiplicity=define > useperlio=define, d_sfio=undef, uselargefiles=define, > usesocks=undef > use64bitint=define, use64bitall=define, uselongdouble=define > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing > -pipe -fstack-protector -I/tools/include -I/usr/local/include - > D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', > optimize='-O2', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe > -fstack-protector -I/tools/include -I/usr/local/include' > ccversion='', gccversion='4.1.2 20070115 (SUSE Linux)', > gccosandvers='' > intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 > d_longlong=define, longlongsize=8, d_longdbl=define, > longdblsize=16 > ivtype='long', ivsize=8, nvtype='long double', nvsize=16, > Off_t='off_t', lseeksize=8 > alignbytes=16, prototype=define > Linker and Libraries: > ld='cc', ldflags ='-fstack-protector -L/tools/lib > -L/usr/local/lib64 -L/usr/local/lib' > libpth=/tools/lib /usr/local/lib64 /usr/local/lib /lib64 /lib > /usr/lib64 /usr/lib > libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc > perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so > gnulibc_version='2.4' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E > -Wl,-rpath,/tools/lib/perl5/5.10.1/x86_64-linux-thread-multi- > ld/CORE' > cccdlflags='-fPIC', lddlflags='-shared -O2 -L/tools/lib > -L/usr/local/lib64 -L/usr/local/lib -fstack-protector' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV > PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP > USE_64_BIT_ALL > USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES > USE_LONG_DOUBLE USE_PERLIO USE_REENTRANT_API > Built under linux > Compiled at Sep 17 2009 17:44:58 > @INC: > /tools/lib/perl5/5.10.1/x86_64-linux-thread-multi-ld > /tools/lib/perl5/5.10.1 > /tools/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi-ld > /tools/lib/perl5/site_perl/5.10.1 > /tools/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi-ld > /tools/lib/perl5/site_perl/5.10.0 > /tools/lib/perl5/site_perl > .