+test_start_limit($input, 1, 0, $size - 1);
+test_start_limit($input, $size, 0, 0);
+test_start_limit($input, 3, $size, $size - 3);
+test_start_limit($input, 1, $size, $size - 1);
+
+ok(my $s = $input->stats, "$module stats");
+diag "stats:\n$s" if ($debug);
+
+$module = 'WebPAC::Input::MARC';
+diag "testing with $module";
+
+ok($input = new WebPAC::Input( module => $module, stats => 1, %LOG ), "new $module");
+
+ok($input->open( path => "$abs_path/data/marc.iso" ), "open marc.iso");
+
+test_after_open($input);
+
+test_fetch($input, $input->size);
+
+ok(my $s = $input->stats, "$module stats");
+
+diag "stats:\n$s" if ($debug);
+# test modify_record
+$module = 'WebPAC::Input::Test';
+ok($input = new WebPAC::Input( module => $module, %LOG ), "new $module");
+
+$WebPAC::Input::Test::rec = {
+ '200' => [
+ { 'a' => '[200 a]', 'b' => '[200 b]', 'c' => '[200 c]', 'f' => '[200 f] test : test' },
+ ],
+ '900' => [
+ { 'x' => 'foobar', },
+ ],
+};
+
+$WebPAC::Input::Test::size = 42;
+
+ok($input->open( path => "/fake/path", ), "open modify_isis (plain)");
+
+cmp_ok($input->size, '==', 42, 'size');
+
+ok(my $rec_p = $input->fetch, 'fetch');
+
+# modify_records
+
+ok($input->open(
+ path => "/another/fake/path",
+ modify_records => {
+ 200 => {
+ '*' => { '^c' => '. ' },
+ '^f' => { ' : ' => ' / ' },
+ }
+ },
+), "open (with modify_records)");
+
+# seek
+throws_ok { $input->seek } qr/without/, 'seek without position';
+cmp_ok($input->seek(0), '==', -1, 'seek');
+
+sub test_filter {
+
+ my $f = $WebPAC::Input::Test::filter_coderef;
+ ok(ref($f) eq 'CODE', 'filter_coderef');
+
+ my ($field, $from, $to) = @_;
+ cmp_ok( $f->( $from, $field, 1 ), 'eq', $to, "filter $field |$from| -> |$to|" );
+}