From 21c3d1ab80a224b6710539cc2890d9352107de93 Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Thu, 2 Sep 2010 09:08:28 -0400 Subject: [PATCH] Unit Test - Bug #476 - Added test to wait.t for Bug #476 - User can specify due: dates that are before wait: dates --- src/tests/wait.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/wait.t b/src/tests/wait.t index 74adaf304..a4be650f8 100755 --- a/src/tests/wait.t +++ b/src/tests/wait.t @@ -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');