Win32-Backup-Robocopy

 view release on metacpan or  search on metacpan

t/03-job.t  view on Meta::CPAN

dies_ok { $bkp->job(src=>'x:\\',name=>'test') } 'job method  expected to die without a crontab string';

# job dies unless source is given
dies_ok { $bkp->job(cron=>'0 0 25 1 *',name=>'test') } 'job method  expected to die without a source';



SKIP: {
		# TODO: spot why this does NOT dies correctly in 5.10
		# even if the test of the module dies..
		skip if $] lt '5.014';
		# job dies with an incorrect crontab
		dies_ok { $bkp->job(cron=>'one 0 0 25',src=>'x:\\',name=>'test') } 'job method  expected to die with an invalid crontab';
}


# a correct invocation
$bkp->job(name=>'test',src=>'X:/supposed/to/not/exist/for/testing',cron=>'0 0 25 1 *');


# jobs queue has one element



( run in 0.643 second using v1.01-cache-2.11-cpan-cc502c75498 )