1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin( -tests => 17 );
11 use_ok('Bio::Restriction::IO');
17 ok my $in = Bio::Restriction::IO->new();
18 ok my $renzs = $in->read;
19 is $renzs->each_enzyme, 532;
21 ok my $e = $renzs->get_enzyme('AccI');
24 my $outfile = test_output_file();
25 ok my $out = Bio::Restriction::IO->new( -format => 'base', -file => ">$outfile" );
27 local $TODO = "writing to a file doesn't seem to work? prints to STDOUT!";
31 #map {print $_->name, "\t", $_->site, "\t", $_->overhang, "\n"} $renzs->each_enzyme;
38 ok $in = Bio::Restriction::IO->new(
39 -format => 'withrefm',
41 -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(
55 -file => test_input_file('rebase.itype2')
58 ok $renzs = $in->read;
59 is $renzs->each_enzyme, 16;
61 ok $out = Bio::Restriction::IO->new( -format => 'base' );
66 -requires_module => 'LWP::UserAgent',
67 -requires_networking => 1
70 eval {$in = Bio::Restriction::IO->new(-format => 'prototype',
72 skip "Couldn't connect to REBASE with Bio::Restriction::IO. Skipping those tests", 3 if $@;
74 ok $in = Bio::Restriction::IO->new(
75 -format => 'prototype',
79 ok my $coll = $in->read;
80 cmp_ok $coll->each_enzyme, '>=', 307;