Lines 1676-1682
subtest 'move_field' => sub {
Link Here
|
1676 |
subtest 'delete_field' => sub { |
1676 |
subtest 'delete_field' => sub { |
1677 |
plan tests => 2; |
1677 |
plan tests => 2; |
1678 |
subtest 'delete subfield' => sub { |
1678 |
subtest 'delete subfield' => sub { |
1679 |
plan tests => 2; |
1679 |
plan tests => 3; |
1680 |
my $record = new_record; |
1680 |
my $record = new_record; |
1681 |
$record->append_fields( |
1681 |
$record->append_fields( |
1682 |
MARC::Field->new( |
1682 |
MARC::Field->new( |
Lines 1710-1715
subtest 'delete_field' => sub {
Link Here
|
1710 |
@fields_952p = |
1710 |
@fields_952p = |
1711 |
read_field( { record => $record, field => '952', subfield => 'p' } ); |
1711 |
read_field( { record => $record, field => '952', subfield => 'p' } ); |
1712 |
is_deeply( \@fields_952p, [], 'Delete all 952$p' ); |
1712 |
is_deeply( \@fields_952p, [], 'Delete all 952$p' ); |
|
|
1713 |
|
1714 |
$record = new_record; |
1715 |
$record->append_fields( |
1716 |
MARC::Field->new( |
1717 |
600, ' ', ' ', |
1718 |
a => 'Murakami, Haruki', |
1719 |
0 => 'https://id.loc.gov/authorities/names/n81152393.html', |
1720 |
), |
1721 |
); |
1722 |
delete_field( { record => $record, field => '600', subfield => '0' } ); |
1723 |
my @fields_600 = read_field( { record => $record, field => '600' } ); |
1724 |
is_deeply( \@fields_600, ['Murakami, Haruki'], 'Delete all 600$0, ony subfield 0 deleted' ); |
1713 |
}; |
1725 |
}; |
1714 |
|
1726 |
|
1715 |
subtest 'delete field' => sub { |
1727 |
subtest 'delete field' => sub { |
1716 |
- |
|
|