From 7d048a8ef872b9b1e5ee01b6c9e70ff1f70a703b Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Mon, 23 Aug 2010 12:42:06 -0400 Subject: [PATCH] Unit Tests - wait.t - added unit test to demonstrate wait:tomorrow report issue --- src/tests/wait.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tests/wait.t b/src/tests/wait.t index 32189fd05..f30a151f0 100755 --- a/src/tests/wait.t +++ b/src/tests/wait.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 15; # Create the rc file. if (open my $fh, '>', 'wait.rc') @@ -67,6 +67,13 @@ $output = qx{../task rc:wait.rc ls}; like ($output, qr/nowait/ms, 'non-waiting task still visible'); like ($output, qr/yeswait/ms, 'waiting task now visible'); +qx{../task rc:wait.rc add wait:tomorrow tomorrow}; +$output = qx{../task rc:wait.rc ls}; +unlike ($output, qr/tomorrow/ms, 'waiting task invisible'); + +$output = qx{../task rc:wait.rc ls wait:tomorrow}; +like ($output, qr/tomorrow/ms, 'waiting task visible when specifically asked for it'); + # Cleanup. unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data');