2 |
|
|
3 |
use strict; |
use strict; |
4 |
|
|
5 |
use Test::More tests => 155; |
use Test::More tests => 157; |
6 |
use Test::Exception; |
use Test::Exception; |
7 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
8 |
use blib; |
use blib; |
679 |
qq{ |
qq{ |
680 |
rec1(200); |
rec1(200); |
681 |
}, |
}, |
682 |
["a1", "b1", "a2", "b2", "c1", "c2"], |
['a1', 'b1', 'a2', 'b2', 'c1', 'c2', 'a3', 'a4', 'b3', 'c3', 'a5' ], |
683 |
|
); |
684 |
|
|
685 |
|
is_deeply( |
686 |
|
[ _pack_subfields_hash({ |
687 |
|
a => [ 'a1', 'a2' ], b => [ 'b1', 'b2' ], c => [ 'c1', 'c2' ], |
688 |
|
subfields => [ qw/a 0 b 0 a 1 b 1 c 0 c 1/ ], |
689 |
|
}) ], |
690 |
|
['a1', 'b1', 'a2', 'b2', 'c1', 'c2'], |
691 |
|
'_pack_subfields_hash( $h )' |
692 |
|
); |
693 |
|
|
694 |
|
is_deeply( |
695 |
|
[ _pack_subfields_hash({ |
696 |
|
a => [ 'a1', 'a2' ], b => [ 'b1', 'b2' ], c => [ 'c1', 'c2' ], |
697 |
|
subfields => [ qw/a 0 b 0 a 1 b 1 c 0 c 1/ ], |
698 |
|
}, 1) ], |
699 |
|
['^a','a1', '^b','b1', '^a','a2', '^b','b2', '^c','c1', '^c','c2'], |
700 |
|
'_pack_subfields_hash( $h, 1 )' |
701 |
); |
); |
702 |
} |
} |
703 |
|
|