Bugzilla – Attachment 65760 Details for
Bug 18900
Wrong number format in receiving order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18900: (QA followup) Make tests conditional to locale existence
Bug-18900-QA-followup-Make-tests-conditional-to-lo.patch (text/plain), 1.99 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-08-09 15:08:57 UTC
(
hide
)
Description:
Bug 18900: (QA followup) Make tests conditional to locale existence
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-08-09 15:08:57 UTC
Size:
1.99 KB
patch
obsolete
>From 9efbcf00a2b9a275e6242224e9c3e3430ae2d6a7 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 9 Aug 2017 12:01:17 -0300 >Subject: [PATCH] Bug 18900: (QA followup) Make tests conditional to locale > existence > >It is important to highlight that tests have been skipped instead of having them pass >on the absence of the required fr_FR.UTF-8 locale installed on the system. > >This patch does that check and effectively skips them. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/Number/Price.t | 21 ++++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) > >diff --git a/t/Number/Price.t b/t/Number/Price.t >index 99d23bc..68365c3 100644 >--- a/t/Number/Price.t >+++ b/t/Number/Price.t >@@ -49,13 +49,20 @@ is( Koha::Number::Price->new(3)->unformat, '3', 'US: unformat 3' ); > is( Koha::Number::Price->new(1234567890)->unformat, > '1234567890', 'US: unformat 1234567890' ); > >-# Bug 18900 - Check params are not from system environement >-setlocale(LC_NUMERIC, "fr_FR.UTF-8"); >-is( Koha::Number::Price->new(12345678.9)->format( { %$format, with_symbol => 1 } ), >- '12,345,678.90', 'US: format 12,345,678.90 with symbol' ); >-is( Koha::Number::Price->new('12,345,678.90')->unformat, >- '12345678.9', 'US: unformat 12345678.9' ); >-setlocale(LC_NUMERIC, $orig_locale); >+SKIP: { >+ # Bug 18900 - Check params are not from system environement >+ setlocale(LC_NUMERIC, "fr_FR.UTF-8"); >+ my $current_locale = setlocale(LC_NUMERIC); >+ >+ skip "fr_FR.UTF-8 locale required for tests and missing", 2 >+ unless $current_locale eq 'fr_FR.UTF-8'; >+ >+ is( Koha::Number::Price->new(12345678.9)->format( { %$format, with_symbol => 1 } ), >+ '12,345,678.90', 'US: format 12,345,678.90 with symbol' ); >+ is( Koha::Number::Price->new('12,345,678.90')->unformat, >+ '12345678.9', 'US: unformat 12345678.9' ); >+ setlocale(LC_NUMERIC, $orig_locale); >+} > > t::lib::Mocks::mock_preference( 'CurrencyFormat', 'FR' ); > $currency = Koha::Acquisition::Currency->new({ >-- >2.7.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 18900
:
64838
|
64839
|
64840
|
65627
|
65628
|
65759
| 65760 |
65761