sub TestFileUpdatedToday { require Test::More; Test::More->import( tests => 4 ); PrepareTestfiles('testfiles'); my $notexist = 'testfiles/notexist'; my $empty = 'testfiles/empty'; my $stale = 'testfiles/stale'; my $updated = 'testfiles/updated'; for my $file ( $notexist , $empty, $stale ){ ok( ! FileUpdatedToday( $file ), "FileUpdatedToday( $file ) should not be true"); } ok( FileUpdatedToday( $updated ), "FileUpdatedToday( $updated ) should be true"); }