Changeset 100


Ignore:
Timestamp:
12/10/05 16:50:20 (19 years ago)
Author:
thauvin
Message:
  • don't allow to instanciate ObsData? w/o config file
Location:
trunk/soft/ObsData
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/soft/ObsData/ObsData.pm

    • Property cvs2svn:cvs-rev changed from 1.31 to 1.32
    r96 r100  
    5353    }; 
    5454 
    55     if ($configfile) { 
    56         (-f $configfile && -r _) or return undef; 
     55    if (!($configfile && -f $configfile && -r _)) { 
     56        return undef; 
    5757    } 
    5858 
  • trunk/soft/ObsData/t/O-01.t

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r71 r100  
    11# $Id$ 
    22 
    3 use Test::More tests => 3; 
     3use Test::More tests => 4; 
    44 
    55use_ok('ObsData'); 
     
    88 
    99ok(!ObsData->new('testdata/wrongfile'), "Return an error on bad file"); 
     10ok(!ObsData->new(undef), "Return an error w/o a config file"); 
Note: See TracChangeset for help on using the changeset viewer.