1 # -*-Perl-*- Test Harness script for Bioperl
11 test_begin(-tests => 18);
13 use_ok('Bio::Restriction::IO');
19 ok my $in = Bio::Restriction::IO->new();
20 ok my $renzs = $in->read;
21 is $renzs->each_enzyme, 532;
23 ok my $e = $renzs->get_enzyme('AccI');
26 my $outfile = test_output_file();
27 ok my $out = Bio::Restriction::IO->new(-format => 'base', -file => ">$outfile");
29 local $TODO = "writing to a file doesn't seem to work? prints to STDOUT!";
32 #map {print $_->name, "\t", $_->site, "\t", $_->overhang, "\n"} $renzs->each_enzyme;
39 ok $in = Bio::Restriction::IO->new
40 (-format=> 'withrefm',
42 -file => test_input_file('rebase.withrefm'));
43 ok $renzs = $in->read;
44 is $renzs->each_enzyme, 11;
49 #enzyme name [tab] prototype [tab] recognition sequence with cleavage site
50 # [tab] methylation site and type [tab] commercial source [tab] references
52 ok $in = Bio::Restriction::IO->new
53 (-format=> 'itype2', -verbose => 0,
54 -file => test_input_file('rebase.itype2'));
56 ok $renzs = $in->read;
57 is $renzs->each_enzyme, 16;
59 ok $out = Bio::Restriction::IO->new(-format=>'base');
62 test_skip(-tests => 3, -requires_networking => 1);
63 #test_skip(-tests => 2, -requires_module => 'LWP::UserAgent');
65 ok $in = Bio::Restriction::IO->new(-format=>'prototype',
68 ok my $coll = $in->read;
69 is $coll->each_enzyme, 307;