Skip Menu |

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

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

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

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



Subject: math.t fails with long doubles turned on
I tried to install Template Toolkit on an OS X machine with a custom-compiled Perl 5.8.8 with 64-bit ints and long doubles. Apparently math.t wasn't prepared to deal with the increased precision: Show quoted text
--- BEGIN TEST OUTPUT --- sh-2.05b# perl -Mblib t/math.t 1..23 ok 1 - running test_expect() ok 2 - template processor is engaged ok 3 - input read and split into 10 tests ok 4 - template text 1 processed OK: [% USE Math; Math.sqrt(9) %] ok 5 - template text 1 matched expected ok 6 - template text 2 processed OK: [% USE Math; Math.abs(-1) %] ok 7 - template text 2 matched expected ok 8 - template text 3 processed OK: [% USE Math; Math.atan2(42, 42) ... MATCH FAILED input: [[% USE Math; Math.atan2(42, 42) %]\n] expect: [0.785398163397448] output: [0.78539816339744831] FAILED 9: - template text 3 did not match expected not ok 9 - template text 3 did not match expected ok 10 - template text 4 processed OK: [% USE Math; Math.cos(2) %] MATCH FAILED input: [[% USE Math; Math.cos(2) %]\n] expect: [-0.416146836547142] output: [-0.416146836547142387] FAILED 11: - template text 4 did not match expected not ok 11 - template text 4 did not match expected ok 12 - template text 5 processed OK: [% USE Math; Math.exp(6) %] MATCH FAILED input: [[% USE Math; Math.exp(6) %]\n] expect: [403.428793492735] output: [403.428793492735123] FAILED 13: - template text 5 did not match expected not ok 13 - template text 5 did not match expected ok 14 - template text 6 processed OK: [% USE Math; Math.hex(42) %] ok 15 - template text 6 matched expected ok 16 - template text 7 processed OK: [% USE Math; Math.int(9.9) %] ok 17 - template text 7 matched expected ok 18 - template text 8 processed OK: [% USE Math; Math.log(42) %] MATCH FAILED input: [[% USE Math; Math.log(42) %]\n] expect: [3.73766961828337] output: [3.73766961828336831] FAILED 19: - template text 8 did not match expected not ok 19 - template text 8 did not match expected ok 20 - template text 9 processed OK: [% USE Math; Math.oct(72) %] ok 21 - template text 9 matched expected ok 22 - template text 10 processed OK: [% USE Math; Math.sin(0.304) %] MATCH FAILED input: [[% USE Math; Math.sin(0.304) %]\n] expect: [0.299339178269093] output: [0.299339178269093191] FAILED 23: - template text 10 did not match expected not ok 23 - template text 10 did not match expected --- END TEST OUTPUT -- All other tests passed. I've installed TT anyway, but it'd be nice if the tests passed in the next version. Perl config follows:
--- BEGIN PERL CONFIGURATION --- Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=8.8.1, archname=darwin-thread-multi-64int-ld-2level uname=(censored) config_args='-e' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include', optimize='-O3', cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include' ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5367)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /opt/local/lib /usr/lib libs=-ldbm -ldl -lm -lc perllibs=-ldl -lm -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LONG_DOUBLE USE_PERLIO Built under darwin Compiled at Feb 24 2007 16:20:17 @INC: /usr/local/lib/perl5/5.8.8/darwin-thread-multi-64int-ld-2level /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/darwin-thread-multi-64int-ld-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .
--- END PERL CONFIGURATION ---
Fixed in 2.19_03 soon to be released as 2.20