Unit Test - Bug #476

- Added test to wait.t for Bug #476 - User can specify due: dates that are before wait: dates
This commit is contained in:
Cory Donnelly 2010-09-02 09:08:28 -04:00
parent ceb7a188bf
commit 21c3d1ab80

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 15;
use Test::More tests => 16;
# Create the rc file.
if (open my $fh, '>', 'wait.rc')
@ -74,6 +74,10 @@ unlike ($output, qr/tomorrow/ms, 'waiting task invisible');
$output = qx{../task rc:wait.rc all status:waiting wait:tomorrow};
like ($output, qr/tomorrow/ms, 'waiting task visible when specifically queried');
# Message is 'Warning: the wait date falls after the due date.'
$output = qx{../task rc:wait.rc add Complain due:today wait:tomorrow};
like ($output, qr/wait\sdate\sfalls/ms, 'warning on wait after due');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');