libole-storage-lite-perl\
libspreadsheet-writeexcel-perl\
libssh2-1-dev\
+ libtest-warn-perl\
libtext-aspell-perl\
libtext-csv-perl\
libuniversal-require-perl\
perl-OLE-Storage_Lite \
perl-RPC-XML \
perl-Spreadsheet-WriteExcel \
+ perl-Test-Warn \
perl-Text-Aspell \
perl-Text-CSV \
perl-Text-CSV_XS \
#!perl -T
-use Test::More tests => 29;
+use Test::More tests => 30;
+use Test::Warn;
use_ok( 'OpenILS::Utils::Configure' );
use_ok( 'OpenILS::Utils::Cronscript' );
);
my $co_mfhd = MFHD->new($co_marc);
-my @comp_holdings = $co_mfhd->get_compressed_holdings($co_mfhd->field('853'));
+my @comp_holdings;
+warning_like {
+ @comp_holdings = $co_mfhd->get_compressed_holdings($co_mfhd->field('853'));
+} [ qr/Cannot compress without pattern data, returning original holdings/ ],
+ "warning when attempting to compress holdings without a pattern";
+
is(@comp_holdings, 0, "Compressed holdings for an MFHD record that only has a caption");
my @decomp_holdings = $co_mfhd->get_decompressed_holdings($co_mfhd->field('853'));