Changeset 74


Ignore:
Timestamp:
11/30/05 09:34:53 (19 years ago)
Author:
thauvin
Message:
  • add sub config_mtime()
Location:
trunk/soft/ObsData
Files:
2 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.22 to 1.23
    r71 r74  
    137137    my ($self, $section, $var, $default) = @_; 
    138138    $self->{config}->val($section, $var, $default); 
     139} 
     140 
     141sub config_mtime { 
     142    my ($self) = @_; 
     143    return (stat($self->{config}->GetFileName))[9]; 
    139144} 
    140145 
  • trunk/soft/ObsData/t/O-02.t

    • Property cvs2svn:cvs-rev changed from 1.12 to 1.13
    r71 r74  
    11# $Id$ 
    22 
    3 use Test::More tests => 26; 
     3use Test::More tests => 27; 
    44use File::Temp qw(tempdir); 
    55use POSIX qw(strftime); 
     
    1919ok(!$o->is_obs('ozone'), "Isobs works"); 
    2020ok($o->getvalue('ohp', 'description'), "can get value"); 
     21ok($o->config_mtime > 0, "Can get mtime of config file"); 
    2122 
    2223ok(eq_set([ $o->list_obs ], [ 'ohp' ]), "Can list observatories"); 
Note: See TracChangeset for help on using the changeset viewer.