1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use Test::More tests => 124; |
use Test::More tests => 132; |
4 |
use Test::Exception; |
use Test::Exception; |
5 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
6 |
use blib; |
use blib; |
171 |
push @{$rec->{'000'}}, 42 unless ($rec->{'000'}); |
push @{$rec->{'000'}}, 42 unless ($rec->{'000'}); |
172 |
#diag "test normalisation of: ",Dumper($n->{import_xml}->{indexer}, $rec); |
#diag "test normalisation of: ",Dumper($n->{import_xml}->{indexer}, $rec); |
173 |
ok(my $ds = $n->data_structure( $rec ), "data_structure"); |
ok(my $ds = $n->data_structure( $rec ), "data_structure"); |
174 |
#diag Dumper($ds); |
diag Dumper($ds) if ($i == 0); |
175 |
cmp_ok($ds->{$tag}->{display}->[$i], 'eq', $r, "parse $tag/$i - $r"); |
cmp_ok($ds->{$tag}->{display}->[$i], 'eq', $r, "parse $tag/$i - $r"); |
176 |
} |
} |
177 |
|
|
245 |
'Tag_x' => { 'isis' => [ |
'Tag_x' => { 'isis' => [ |
246 |
{ content => 'v900^x' }, |
{ content => 'v900^x' }, |
247 |
] }, |
] }, |
248 |
|
'Tag_s1' => { 'isis' => [ |
249 |
|
{ content => 's900^b = s900^x' }, |
250 |
|
] }, |
251 |
|
'Tag_s2' => { 'isis' => [ |
252 |
|
{ content => 's900^a s900^b s900^c s900^x' }, |
253 |
|
] }, |
254 |
}; |
}; |
255 |
|
|
256 |
parse_test_arr($import, 'Tag_a', $rec, [ '','a1','','a2' ] ); |
parse_test_arr($import, 'Tag_a', $rec, [ '','a1','','a2' ] ); |
257 |
parse_test_arr($import, 'Tag_b', $rec, [ 'b1','b2','b3','b4' ] ); |
parse_test_arr($import, 'Tag_b', $rec, [ 'b1','b2','b3','b4' ] ); |
258 |
parse_test_arr($import, 'Tag_c', $rec, [ '','','c1','c2' ] ); |
parse_test_arr($import, 'Tag_c', $rec, [ '','','c1','c2' ] ); |
259 |
parse_test_arr($import, 'Tag_x', $rec, [ 'b1','a1_b2','b3_c1','a2_b4_c2' ] ); |
parse_test_arr($import, 'Tag_x', $rec, [ 'b1','a1_b2','b3_c1','a2_b4_c2' ] ); |
260 |
|
parse_test_arr($import, 'Tag_s1', $rec, [ 'b1 = b1', 'b1 = b1', 'b1 = b1', 'b1 = b1' ] ); |
261 |
|
|