From 9c5af7117795673159ad644f739e0fc644e657fd Mon Sep 17 00:00:00 2001 From: Rohit Upadhyay Date: Tue, 30 Jan 2018 09:05:54 +0530 Subject: [PATCH] Fixes #4520, added gigapascal to pressure units to fix broken unit (#4522) * fixed overtriggering in Game2048 * Added two more tests to help fix issue #4473 * Added regex guard in handle function to fix #4473. * modified regex guard for #4473 * Added a test to t/Game2048.t * Removed trailing comma. * Conversions: Added Gigapascal to pressure units #4520 * Update Conversions.t * Update Conversions.t * Added test for Gbar for conversions goodie --- share/goodie/conversions/conversions.js | 3 ++- t/Conversions.t | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/share/goodie/conversions/conversions.js b/share/goodie/conversions/conversions.js index e73099324..1cb95af1e 100644 --- a/share/goodie/conversions/conversions.js +++ b/share/goodie/conversions/conversions.js @@ -587,7 +587,8 @@ DDH.conversions = DDH.conversions || {}; { symbol: 'dbar', name: 'Decibar' }, { symbol: 'kbar', name: 'Kilobar' }, { symbol: 'Mbar', name: 'Megabar' }, - { symbol: 'Gbar', name: 'Gigabar' } + { symbol: 'Gbar', name: 'Gigabar' }, + { symbol: 'GPa', name: 'Gigapascal' }, ], defaults: ['Pa', 'psi'] }, diff --git a/t/Conversions.t b/t/Conversions.t index e5a6842c0..422cd9826 100755 --- a/t/Conversions.t +++ b/t/Conversions.t @@ -536,6 +536,22 @@ ddg_goodie_test( physical_quantity => 'pressure' }) ), + '1 gpa to megapascal' => test_zci( + '', structured_answer => make_answer({ + raw_input => '1', + from_unit => 'GPa', + to_unit => 'MPa', + physical_quantity => 'pressure' + }) + ), + '1 gpa to gbar' => test_zci( + '', structured_answer => make_answer({ + raw_input => '1', + from_unit => 'GPa', + to_unit => 'Gbar', + physical_quantity => 'pressure' + }) + ), # DURATION '36 months to years' => test_zci( '', structured_answer => make_answer({