Mercurial > repos > fgiacomoni > downloader_bank_hmdb
comparison t/lib/utilsTest.pm @ 0:7c9269bded0e draft
Init repository for [downloader_bank_hmdb]
| author | fgiacomoni |
|---|---|
| date | Tue, 14 Jan 2020 05:21:23 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:7c9269bded0e |
|---|---|
| 1 package utilsTest ; | |
| 2 | |
| 3 use diagnostics; # this gives you more debugging information | |
| 4 use warnings; # this warns you of bad practices | |
| 5 use strict; # this prevents silly errors | |
| 6 use Exporter ; | |
| 7 use Carp ; | |
| 8 | |
| 9 use Data::Dumper ; | |
| 10 | |
| 11 our $VERSION = "1.0"; | |
| 12 our @ISA = qw(Exporter); | |
| 13 our @EXPORT = qw( getHttpFileVersionTest getHttpFileTest unzipFileTest); | |
| 14 our %EXPORT_TAGS = ( ALL => [qw( getHttpFileVersionTest getHttpFileTest unzipFileTest)] ); | |
| 15 | |
| 16 use lib '/Users/fgiacomoni/Inra/labs/perl/downloader-bank-hmdb/lib' ; | |
| 17 use utils qw( :ALL ) ; | |
| 18 | |
| 19 | |
| 20 sub getHttpFileVersionTest { | |
| 21 my ($url) = @_ ; | |
| 22 my $oObject = utils->new() ; | |
| 23 my ($version) = $oObject->getHttpFileVersion($url) ; | |
| 24 # print Dumper $version ; | |
| 25 return ($version) ; | |
| 26 } | |
| 27 | |
| 28 sub getHttpFileTest { | |
| 29 my ($url, $filename) = @_ ; | |
| 30 my $oObject = utils->new() ; | |
| 31 my ($file) = $oObject->getHttpFile($url, $filename) ; | |
| 32 # print Dumper $version ; | |
| 33 return ($file) ; | |
| 34 } | |
| 35 | |
| 36 sub unzipFileTest { | |
| 37 my ($archive, $filePath, $fileName) = @_ ; | |
| 38 my $oObject = utils->new() ; | |
| 39 $oObject->unzipFile($archive, $filePath, $fileName) ; | |
| 40 # print Dumper $version ; | |
| 41 return (1) ; | |
| 42 } | |
| 43 | |
| 44 | |
| 45 1 ; |
