From: Galen Charlton Date: Wed, 2 Mar 2016 20:38:52 +0000 (-0500) Subject: LP#1516757: add Perl test case X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=43319f4b31639d90ac5167763aafd2e3a1dc273a;p=Evergreen.git LP#1516757: add Perl test case Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/t/12-OpenILS-SIP.t b/Open-ILS/src/perlmods/t/12-OpenILS-SIP.t index cf93a0caa2..454a21ac57 100644 --- a/Open-ILS/src/perlmods/t/12-OpenILS-SIP.t +++ b/Open-ILS/src/perlmods/t/12-OpenILS-SIP.t @@ -1,6 +1,8 @@ -#!perl -T +#!perl +# note that taint mode is explicitly off; see +# https://rt.cpan.org/Public/Bug/Display.html?id=94520 for why -use Test::More tests => 8; +use Test::More tests => 9; BEGIN { use_ok( 'OpenILS::SIP' ); @@ -13,3 +15,8 @@ use_ok( 'OpenILS::SIP::Transaction' ); use_ok( 'OpenILS::SIP::Transaction::Checkin' ); use_ok( 'OpenILS::SIP::Transaction::Checkout' ); use_ok( 'OpenILS::SIP::Transaction::Renew' ); + +$ENV{TZ} = 'America/New_York'; # chosen to exercise the LP#1516757 bug +my $dob = '1960-12-31'; +my $dob_formatted = OpenILS::SIP->format_date($dob, 'dob'); +is($dob_formatted, '19601231', 'LP#1516757: ensure dates of birth do not get offset');