--- trunk/t/3-normalize.t 2007/11/19 16:33:09 1048 +++ trunk/t/3-normalize.t 2008/10/26 15:57:37 1118 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 344; +use Test::More tests => 348; BEGIN { use_ok( 'WebPAC::Test' ); @@ -896,5 +896,11 @@ test_rule( 'rec(200,i1)', $rec, qq{ rec(200,'i1') }, [ '0' ] ); test_rule( 'rec(200,i2)', $rec, qq{ rec(200,'i2') }, [ '1' ] ); + my $hash = { a => '[a]', 'b' => '[b]', subfields => [ 'a', 0, 'b', 0 ] }; + is_deeply([ _pack_subfields_hash( $hash ) ], [ '[a]', '[b]' ], '_pack_subfields_hash' ); + ok( $hash->{subfields}, 'subfields exist' ); + cmp_ok( _pack_subfields_hash( $hash, 1 ), 'eq', '^a[a]^b[b]', '_pack_subfields_hash' ); + ok( $hash->{subfields}, 'subfields exist' ); + }