Changeset 118


Ignore:
Timestamp:
12/12/05 20:49:24 (18 years ago)
Author:
thauvin
Message:
  • add checkconf return value and use the proper file for the test
Location:
trunk/soft/ObsData
Files:
2 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.36 to 1.37
    r117 r118  
    139139sub checkconfig { 
    140140    my ($self) = @_; 
     141    my $result = 1; 
    141142    foreach my $g ($self->{config}->GroupMembers('Obs')) { 
    142143        my ($obs) = $g =~ /\S+\s+(.*)/; 
     
    155156                    $@, 
    156157                ); 
     158                $result = 0; 
    157159                # TODO set this reg unavalable 
    158160            } 
    159161        } 
    160162    } 
     163    return($result); 
    161164} 
    162165 
  • trunk/soft/ObsData/t/O-03.t

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r117 r118  
    77use_ok('ObsData'); 
    88 
    9 ok(my $o = ObsData->new('testdata/obsdata-conftest', logfile => "testdata/obsdata.log"), "Can create object"); 
     9ok(my $o = ObsData->new('testdata/obsdata-wrongconf', logfile => "testdata/obsdata.log"), "Can create object"); 
    1010 
    1111ok(!$o->checkconfig, "Get error on wrong config file"); 
Note: See TracChangeset for help on using the changeset viewer.