Subject: | Text::Autoformat test errors on Solaris |
This is Text::Autoformat 1.04, perl 5.8.0 (shared libperl, ithreads),
Solaris/Sparc 7, Forte 6.2 compiler.
Line 150 of Autoformat.pm should read:
< my $formatted = sprintf "%$fmtnum.${dlen}lf", $num;
Show quoted text
> my $formatted = sprintf "%$fmtnum.${dlen}Lf", $num;
Solaris *printf chokes on %lf (rather than %Lf)
Furthermore, the test reports (after this change):
ok 26
expected [***????.????***
*** 1.0 ***
*** 1.1 ***
*** 1.0000***
*** 1.0001***
*** 1.2345***
*** 1.2346***
***1111.0 ***
***####.####***
***????.????***
***????.????***
*** 0.0 ***
]
but got [*** NaN***
*** 1.0 ***
*** 1.1 ***
*** 1.0000***
*** 1.0001***
*** 1.2345***
*** 1.2346***
***1111.0 ***
***####.####***
***????.????***
***????.????***
*** 0.0 ***
]
not ok 27
expected [*** 1.0000***
*** 1.1000***
*** 1.0000***
*** 1.0001***
*** 1.2345***
*** 1.2346***
***1111.0000***
***####.####***
*** 0.0000***
]
but got [*** NaN***
*** 1.0000***
*** 1.1000***
*** 1.0000***
*** 1.0001***
*** 1.2345***
*** 1.2346***
***1111.0000***
***####.####***
*** 0.0000***
]
not ok 28
Maybe the module has to be platform-specific (%lf vs. %Lf)
and/or the test must consider different printf implementations?
Best regards,
Marek