From 524a3dc3713745ed22966446b97a302cd1593eed Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 2 Mar 2016 15:38:52 -0500 Subject: [PATCH] LP#1516757: add Perl test case Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/t/12-OpenILS-SIP.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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'); -- 2.11.0