+ our $lccns = {};
+ if ($ARGV[0]) {
+ BAIL_OUT("USAGE: perl Labels_split_lccn.t 'HE 8700.7 .P6 T44 1983' 'HE,8700.7,.P6,T44,1983'") unless $ARGV[1];
+ $lccns = {$ARGV[0] => [split (/,/,$ARGV[1])],};
+ }
+ else {
+ $lccns = {
+ 'HE8700.7 .P6T44 1983' => [qw(HE 8700.7 .P6 T44 1983)],
+ 'BS2545.E8 H39 1996' => [qw(BS 2545 .E8 H39 1996)],
+ 'NX512.S85 A4 2006' => [qw(NX 512 .S85 A4 2006)],
+ 'QH541.15.C6 C25 2012' => [qw(QH 541.15 .C6 C25 2012)],
+ '123 ABC FOO BAR' => [qw(123 ABC FOO BAR)],
+ };
+ }
+ my $test_num = 1;
+ foreach (keys(%$lccns)) {
+ my $split_num += scalar(@{$lccns->{$_}});
+ $test_num += 2 * $split_num;
+ $test_num += 4;
+ }
+ plan tests => $test_num;
+ use_ok('C4::Labels::Label');
+ use vars qw($lccns);