125 |
ok($input->open( path => "$abs_path/modify_isis/LIBRI", ), "open modify_isis (plain)"); |
ok($input->open( path => "$abs_path/modify_isis/LIBRI", ), "open modify_isis (plain)"); |
126 |
ok(my $rec_p = $input->fetch, 'fetch'); |
ok(my $rec_p = $input->fetch, 'fetch'); |
127 |
|
|
128 |
|
# modify_records |
129 |
|
|
130 |
ok($input->open( |
ok($input->open( |
131 |
path => "$abs_path/modify_isis/LIBRI", |
path => "$abs_path/modify_isis/LIBRI", |
132 |
modify_records => { |
modify_records => { |
140 |
|
|
141 |
cmp_ok($rec_p->{200}->[0]->{f} . '. ' . $rec_p->{200}->[0]->{c}, 'eq' ,$rec->{200}->[0]->{f}, 'modify_records working'); |
cmp_ok($rec_p->{200}->[0]->{f} . '. ' . $rec_p->{200}->[0]->{c}, 'eq' ,$rec->{200}->[0]->{f}, 'modify_records working'); |
142 |
|
|
143 |
|
diag dump($input); |
144 |
|
|
145 |
|
# break encapsulation, bad! bad! |
146 |
|
$input->{ll_db}->{record} = { |
147 |
|
900 => 'foo ; bar ; baz', |
148 |
|
}; |
149 |
|
|
150 |
|
$input->{modify_record} = { |
151 |
|
900 => { |
152 |
|
'*' => { |
153 |
|
' ; ' => 'a', |
154 |
|
} |
155 |
|
} |
156 |
|
}; |
157 |
|
|
158 |
|
diag "hacked: ",dump($input, $input->fetch); |