Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 20807
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: david [...] mckelvie.org.uk
Cc:
AdminCc:

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



Subject: fileline.t test fails - Linux Fedora 4, Perl v5.8.6
Date: Wed, 2 Aug 2006 05:54:36 -0400 (EDT)
To: bug-Template-Toolkit [...] rt.cpan.org
From: David McKelvie <d.mckelvie [...] blueyonder.co.uk>
Using Template-Toolkit-2.15 gmake test ... t/file................ok t/fileline............ok 5/11FAILED 9: - template text 3 did not match expected t/fileline............FAILED test 9 Failed 1/11 tests, 90.91% okay t/filter..............ok ... Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/fileline.t 11 1 9.09% 9 3 tests skipped. Failed 1/81 test scripts, 98.77% okay. 1/2639 subtests failed, 99.96% okay. Sorry, don't know enough about the test harness to know what the actual output is and the expected output is. But will send files if you tell me which they are. Generally a nice piece of software tho. David McKelvie
From: mromani [...] ottotecnica.com
On Mer. 02 Ago. 2006 05:54:42, david@mckelvie.org.uk wrote: Show quoted text
> > Using Template-Toolkit-2.15 > > gmake test > > ... > > t/file................ok > t/fileline............ok 5/11FAILED 9: - template text 3 did not > match expected > t/fileline............FAILED test 9 > Failed 1/11 tests, 90.91% okay > t/filter..............ok > > ... > > Failed Test Stat Wstat Total Fail Failed List of Failed >
------------------------------------------------------------------------------- Show quoted text
> t/fileline.t 11 1 9.09% 9 > 3 tests skipped. > Failed 1/81 test scripts, 98.77% okay. 1/2639 subtests failed, 99.96% > okay. > > Sorry, don't know enough about the test harness to know what the > actual output is > and the expected output is. But will send files if you tell me which > they are. > > Generally a nice piece of software tho. > > David McKelvie > >
I have this same problem too. Here are the relevant details: t/fileline............1..11 ok 1 - running test_expect() ok 2 - template processor is engaged ok 3 - input read and split into 4 tests ok 4 - template text 1 processed OK: [% place = 'World' -%]\nHello [% ... ok 5 - template text 1 matched expected ok 6 - template text 2 processed OK: [% INCLUDE warning -%]\nfile: [% ... ok 7 - template text 2 matched expected FAILED 9: - template text 3 did not match expected ok 8 - template text 3 processed OK: [% INCLUDE warning -%]\nfile: [% ... MATCH FAILED input: [[% INCLUDE warning -%]\nfile: [% file.chunk(-16).last %]\nline: [% line %]\nwarn: [% warn %]\n] expect: [Hello\nWorld\nfile: (eval 10)\nline: 10\nwarn: Argument "" isn't numeric in addition (+)] output: [Hello\nWorld\nfile: (eval 11)\nline: 10\nwarn: Argument "" isn't numeric in addition (+)] not ok 9 - template text 3 did not match expected ok 10 - template text 4 processed OK: [% TRY; \n INCLUDE chomp; \n ... ok 11 - template text 4 matched expected FAILED test 9 My OS is: Linux serverlinux 2.6.16-gentoo-r9 #2 SMP Fri Jul 7 09:44:09 CEST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GNU/Linux My Perl configuration is in attachment.
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.16-gentoo-r9, archname=i686-linux uname='linux serverlinux 2.6.16-gentoo-r9 #2 smp fri jul 7 09:44:09 cest 2006 i686 intel(r) pentium(r) 4 cpu 2.60ghz genuineintel gnulinux ' config_args='-des -Darchname=i686-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=i686-pc-linux-gnu-gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth= -Doptimize=-O2 -march=i686 -pipe -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dinc_version_list=5.8.0 5.8.0/i686-linux 5.8.2 5.8.2/i686-linux 5.8.4 5.8.4/i686-linux 5.8.5 5.8.5/i686-linux 5.8.6 5.8.6/i686-linux 5.8.7 5.8.7/i686-linux -Dcf_by=Gentoo -Ud_csh -Dusenm -Di_ndbm -Di_gdbm -Di_db' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='i686-pc-linux-gnu-gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -march=i686 -pipe', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/include/gdbm' ccversion='', gccversion='3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='i686-pc-linux-gnu-gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Jul 7 2006 15:26:05 @INC: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.7/i686-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .
From: mromani [...] ottotecnica.com
On Mer. 30 Ago. 2006 08:18:36, mromani@ottotecnica.com wrote: Show quoted text
> On Mer. 02 Ago. 2006 05:54:42, david@mckelvie.org.uk wrote:
> > > > Using Template-Toolkit-2.15 > > > > gmake test > > > > ... > > > > t/file................ok > > t/fileline............ok 5/11FAILED 9: - template text 3 did not > > match expected > > t/fileline............FAILED test 9 > > Failed 1/11 tests, 90.91% okay > > t/filter..............ok > > > > ... > > > > Failed Test Stat Wstat Total Fail Failed List of Failed > >
>
------------------------------------------------------------------------------- Show quoted text
> > t/fileline.t 11 1 9.09% 9 > > 3 tests skipped. > > Failed 1/81 test scripts, 98.77% okay. 1/2639 subtests failed,
> 99.96%
> > okay. > > > > Sorry, don't know enough about the test harness to know what the > > actual output is > > and the expected output is. But will send files if you tell me which > > they are. > > > > Generally a nice piece of software tho. > > > > David McKelvie > > > >
> > I have this same problem too. Here are the relevant details: > > t/fileline............1..11 > ok 1 - running test_expect() > ok 2 - template processor is engaged > ok 3 - input read and split into 4 tests > ok 4 - template text 1 processed OK: [% place = 'World' -%]\nHello [% > ... > ok 5 - template text 1 matched expected > ok 6 - template text 2 processed OK: [% INCLUDE warning -%]\nfile: [% > ... > ok 7 - template text 2 matched expected > FAILED 9: - template text 3 did not match expected > ok 8 - template text 3 processed OK: [% INCLUDE warning -%]\nfile: [% > ... > MATCH FAILED > input: [[% INCLUDE warning -%]\nfile: [% file.chunk(-16).last > %]\nline: > [% line %]\nwarn: [% warn %]\n] > expect: [Hello\nWorld\nfile: (eval 10)\nline: 10\nwarn: Argument "" > isn't numeric in addition (+)] > output: [Hello\nWorld\nfile: (eval 11)\nline: 10\nwarn: Argument "" > isn't numeric in addition (+)] > not ok 9 - template text 3 did not match expected > ok 10 - template text 4 processed OK: [% TRY; \n INCLUDE chomp; \n > ... > ok 11 - template text 4 matched expected > FAILED test 9 > > > My OS is: > Linux serverlinux 2.6.16-gentoo-r9 #2 SMP Fri Jul 7 09:44:09 CEST 2006 > i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GNU/Linux > > My Perl configuration is in attachment.
Now changing the test like this: [root@host Template-Toolkit-2.15]# diff -Bub t/fileline.t /fileline.t.modified --- t/fileline.t 2006-08-30 14:24:56.000000000 +0200 +++ t/fileline.t.modified 2006-08-30 14:24:47.000000000 +0200 @@ -91,7 +91,7 @@ -- expect -- Hello World -file: (eval 10) +file: (eval 11) line: 10 warn: Argument "" isn't numeric in addition (+) makes the test succed, but I'm not sure if the test file had a typo or if the test fails and I'm just cheating.
Subject: Re: [rt.cpan.org #20807] fileline.t test fails - Linux Fedora 4, Perl v5.8.6
Date: Wed, 30 Aug 2006 20:37:26 +0100
To: bug-Template-Toolkit [...] rt.cpan.org
From: Andy Wardley <abw [...] wardley.org>
mromani@ottotecnica.com via RT wrote: Show quoted text
> -file: (eval 10) > +file: (eval 11)
It's down to a peculiarity in Perl on certain platforms that makes it report different line numbers. So technically, it's a bug in Perl, but a very minor one. Anyway, I fixed the test a while back to work around this issue. There's a developer release 2.15b available from template-toollkit.org which should be OK. I'll be rolling this out as a "proper" 2.16 release at some point in the near future. Thanks for reporting it all the same. Cheers A
Subject: Re: [rt.cpan.org #20807] fileline.t test fails - Linux Fedora 4, Perl v5.8.6
Date: Wed, 30 Aug 2006 16:47:37 -0400 (EDT)
To: bug-Template-Toolkit [...] rt.cpan.org
From: David McKelvie <d.mckelvie [...] blueyonder.co.uk>
Show quoted text
>> Thanks for reporting it all the same.
Thanks for responding. cheers, David
This has nothing to do with line count but with eval "" count: perl -e 'for (1...10){ eval "die"; print $@ }' Died at (eval 1) line 1. Died at (eval 2) line 1. Died at (eval 3) line 1. Died at (eval 4) line 1. Died at (eval 5) line 1. Died at (eval 6) line 1. Died at (eval 7) line 1. Died at (eval 8) line 1. Died at (eval 9) line 1. Died at (eval 10) line 1. It may be that on different platform a different number of string-evals have happened before the run reaches this test, so no bug in perl or tt, just in the test itself.
This was fixed in v2.19