Bugzilla – Attachment 64171 Details for
Bug 18774
Internal Server Error in Price.pm with big numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18774: Add test to highlight problem with Internal Server Error in Price.pm
Bug-18774-Add-test-to-highlight-problem-with-Inter.patch (text/plain), 1.37 KB, created by
Marc Véron
on 2017-06-10 06:19:07 UTC
(
hide
)
Description:
Bug 18774: Add test to highlight problem with Internal Server Error in Price.pm
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-06-10 06:19:07 UTC
Size:
1.37 KB
patch
obsolete
>From 9f01d064ca4cfeaae3e1f1a94c3c8b4a51716ce5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sat, 10 Jun 2017 08:15:29 +0200 >Subject: [PATCH] Bug 18774: Add test to highlight problem with Internal Server > Error in Price.pm > >Add a test for a big number to t/Number/Price.t > >Test will fail with: >round() overflow. Try smaller precision or use Math::BigFloat at >(...)/Koha/Number/Price.pm line 44. >--- > t/Number/Price.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/Number/Price.t b/t/Number/Price.t >index ad4f0cf..173d45f 100644 >--- a/t/Number/Price.t >+++ b/t/Number/Price.t >@@ -1,6 +1,6 @@ > use Modern::Perl; > >-use Test::More tests => 28; >+use Test::More tests => 29; > > use Test::MockModule; > use t::lib::Mocks; >@@ -27,6 +27,9 @@ is( Koha::Number::Price->new->format( $format ), '0.00', 'US: format 0' ); > is( Koha::Number::Price->new(3)->format( $format ), '3.00', 'US: format 3' ); > is( Koha::Number::Price->new(1234567890)->format( $format ), > '1,234,567,890.00', 'US: format 1234567890' ); >+# Test a very big number >+is( Koha::Number::Price->new(99999999999999)->format( $format ), >+ '99,999,999,999,999.00', 'US: format 99999999999999' ); > > # FIXME This should be display symbol, but it was the case before the creation of this module > is( Koha::Number::Price->new->format( { %$format, with_symbol => 1 } ), >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18774
:
64171
|
64188