2 ## Bioperl Test Harness Script for Modules
5 # Before `make install' is performed this script should be runnable with
6 # `make test'. After `make install' it should work as `perl test.t'
11 # to handle systems with no installed Test module
12 # we include the t dir (where a copy of Test.pm is located)
14 eval { require Test; };
24 my $obj = new Bio::Root::IO(-verbose => 0);
26 ok defined($obj) && $obj->isa('Bio::Root::IO');
28 # doesn't work in perl 5.00405
29 my ($tfh,$tfile,$tdir,$val);
31 ($tfh,$tfile) = $obj->tempfile();
34 open(IN, $tfile) or die("cannot open $tfile");
35 $val = join("", <IN>) ;
46 $obj = new Bio::Root::IO();
49 ($tdir) = $obj->tempdir(CLEANUP=>1);
50 ($tfh, $tfile) = $obj->tempfile(dir => $tdir);
58 else { ok( ! -e $tfile ); }
61 $obj = new Bio::Root::IO(-verbose => 0);
62 ($tfh, $tfile) = $obj->tempfile(UNLINK => 0);
64 ok( -e $tfile ,1, "tempfile ($tfile) does not exist when it should");
69 else { ok( -e $tfile) }