X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=Equinox-Migration%2Ft%2F03-MapDrivenMARCXMLProc.t;h=8c0d0f95c375a6639e310564a198bbb38911208a;hp=dbab4cd79ada9e786d25969c34e01306bf03cc6b;hb=69ca50f0514a2bf1626005925c134cb7e268556e;hpb=4c451aceaa1c5c36d9f5dd6529ef9f246dfaed6d diff --git a/Equinox-Migration/t/03-MapDrivenMARCXMLProc.t b/Equinox-Migration/t/03-MapDrivenMARCXMLProc.t index dbab4cd..8c0d0f9 100644 --- a/Equinox-Migration/t/03-MapDrivenMARCXMLProc.t +++ b/Equinox-Migration/t/03-MapDrivenMARCXMLProc.t @@ -49,6 +49,7 @@ is ($rec->{tags}[0]{tag}, 999, 'tag id 4'); is ($rec->{tags}[0]{uni}{a}, "FIC DEV", 'subfield value 4'); $rec = shift @{ $mp->{data}{recs} }; is ($rec, undef, 'no more records'); +$mp->DESTROY; # with map-01, 999$a and 999$q are captured. q only exists on the second # record; the others should the placeholder value of '' @@ -62,6 +63,7 @@ is ($rec->{tags}[0]{uni}{j}, undef, 'we shouldnt have captured this, even if it $rec = shift @{ $mp->{data}{recs} }; is ($rec->{tags}[0]{uni}{a}, "MYS 2", '999$a'); is ($rec->{tags}[0]{uni}{q}, "TEST", '999$q does exist here'); +$mp->DESTROY; # map-02 adds 999$x *not* as multi, producing a fatal error on the last record #eval { $mp = Equinox::Migration::MapDrivenMARCXMLProc->new( marcfile => 't/corpus/mdmp-0.txt', @@ -99,6 +101,7 @@ is_deeply ($rec->{tags}[0]{multi}{'x'}, ['FICTION','FICTION2','FICTION3','FICTIO '999$x - multi'); is ($rec->{tmap}{250}, undef, 'tag map test 2a'); is_deeply ($rec->{tmap}{999}, [0], 'tag map test 2b'); +$mp->DESTROY; # map-05 is map-04 with a "no digits" filter on 999$x $mp = Equinox::Migration::MapDrivenMARCXMLProc->new( marcfile => 't/corpus/mdmp-0.txt',