1 # This is -*-Perl-*- code
2 ## Bioperl Test Harness Script for Modules
6 # Before `make install' is performed this script should be runnable with
7 # `make test'. After `make install' it should work as `perl test.t'
10 use vars qw($NUMTESTS $DEBUG);
13 # to handle systems with no installed Test module
14 # we include the t dir (where a copy of Test.pm is located)
17 $DEBUG = $ENV{'BIOPERLDEBUG'} || 0;
19 eval {require Test::More;};
26 require LWP::UserAgent;
28 require HTTP::Request::Common;
31 plan skip_all => 'HTML::Parser or LWP::UserAgent or HTTP::Request not installed. This means Bio::DB::GDB modules is not usable. Skipping tests';
34 plan skip_all => 'Skipping all tests since they require network access, set BIOPERLDEBUG=1 to test';
37 plan tests => $NUMTESTS;
39 use_ok('Bio::DB::GDB');
44 my ($gdb, $marker, $info);
50 $gdb = new Bio::DB::GDB(-verbose=>$verbose);
53 $info = $gdb->get_info(-type=>'marker',
57 if( $@ || ! defined $info) {
58 skip("Warning: Couldn't connect to GDB website! Skipping all other tests",11);
63 is $info->{gdbid}, 'GDB:188296', 'info was ' . $info->{gdbid};
64 is $info->{primers}->[0], 'GCCCAGGAGGTTGAGG', 'info was ' . $info->{primers}->[0];
65 is $info->{primers}->[1], 'AAGGCAGGCTTGAATTACAG', 'info was ' . $info->{primers}->[1];
66 is $info->{'length'}, 226, 'info was '. $info->{'length'};
71 $info = $gdb->get_info(-type=>'marker',
74 if( $@ || ! defined $info) {
75 skip("Warning: Couldn't connect to GDB website! Skipping all other tests",5);
78 is $info->{gdbid}, 'GDB:198271', 'info was ' . $info->{gdbid};
79 is $info->{primers}->[0], 'GGGTGACAGAACAAGACCT', 'info was ' . $info->{primers}->[0];
80 is $info->{primers}->[1], 'ACCCATTAGCCTTGAACTGA', 'info was ' . $info->{primers}->[1];
81 is $info->{'length'}, 155, 'info was '. $info->{'length'};