From b1047e4549d4750b35f5f0da2c9cd6cf064e4b86 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 11 Apr 2014 07:27:36 -0400 Subject: [PATCH] Bug 9593 - Additional Unit Tests --- t/db_dependent/MungeMarcPrice.t | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/MungeMarcPrice.t b/t/db_dependent/MungeMarcPrice.t index 368a087..1dbdb76 100755 --- a/t/db_dependent/MungeMarcPrice.t +++ b/t/db_dependent/MungeMarcPrice.t @@ -17,11 +17,18 @@ $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; # set some test price strings and expected output -my @prices2test=( { string =>'25,5 £, $34,55, $LD35', expected => '34.55' }, - { string=>'32 EUR, 42.50$ USD, 54 CAD',expected=>'42.50' }, - { string =>'38.80 Ksh, ¥300, 51,50 USD', expected => '51.50' }, - { string =>'44 $, 33 €, 64 Br, £30', expected => '44' } - ); +my @prices2test = ( + { string => '25,5 £, $34,55, $LD35', expected => '34.55' }, + { string => '32 EUR, 42.50$ USD, 54 CAD', expected => '42.50' }, + { string => '38.80 Ksh, ¥300, 51,50 USD', expected => '51.50' }, + { string => '44 $, 33 €, 64 Br, £30', expected => '44' }, + { string => '$55.32', expected => '55.32' }, + { string => '9.99 USD (paperback)', expected => '9.99' }, + { string => '$9.99 USD (paperback)', expected => '9.99' }, + { string => '18.95 (U.S.)', expected => '18.95' }, + { string => '$5.99 ($7.75 CAN)', expected => '5.99' }, + { string => '5.99 (7.75 CAN)', expected => '5.99' }, +); plan tests => scalar @prices2test; -- 1.7.2.5