-ok(my $rec = $input->fetch, 'fetch');
-diag "fetched rec = ", dump($rec) if ($debug);
+test_filter(200,
+ '^a foo ; bar = baz : zzz',
+ '^a foo^kbar^dbaz : zzz',
+);
+
+# empty subfield removal
+
+ok($input->open(
+ path => "/another/fake/path",
+ modify_records => {
+ 900 => {
+ '^a' => { '^e' => ' : ^e' },
+ },
+ 901 => {
+ '^a' => { 'foo' => 'baz' },
+ },
+ },
+), "open (with modify_records for empty subfields)");
+
+test_filter(900,
+ '^a^ebar',
+ '^a^ebar',
+);
+
+test_filter(900,
+ '^afoo^ebar',
+ '^afoo : ^ebar',
+);
+
+test_filter(901,
+ '^afoo^ebar',
+ '^abaz^ebar',
+);