From 529217cf7570da6bacf991a8ef862e570c4d4e5b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 4 Nov 2014 22:01:07 -0500 Subject: [PATCH] Unit Tests - One test has the rc.monthsperline:1 on the wrong command. Not sure what was going on there. Not important. --- test/cal.t | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/test/cal.t b/test/cal.t index 8f28968f8..380143460 100755 --- a/test/cal.t +++ b/test/cal.t @@ -230,19 +230,14 @@ unlike ($output, qr/20160101/, "$ut: Due date 20160101 is not displayed"); like ($output, qr/5 tasks/, "$ut: 5 due tasks are displayed"); $day = $nday; -if ( $day <= 9) -{ - $day = "0".$day; -} +$day = "0".$day if $day < 10; + my $mon = $nmon + 1; -if ( $mon <= 9) -{ - $mon = "0".$mon; -} +$mon = "0".$mon if $mon < 10; my $duedate = $year.$mon.$day; -qx{../src/task rc:$rc add due:$duedate rc.monthsperline:1 nine 2>&1}; -$output = qx{../src/task rc:$rc calendar 2>&1}; +qx{../src/task rc:$rc add due:$duedate nine 2>&1}; +$output = qx{../src/task rc:$rc calendar rc.monthsperline:1 2>&1}; like ($output, qr/$month\S*?\s+?$year/, "$ut: Current month and year are displayed"); like ($output, qr/$duedate/, "$ut: Due date on current day is displayed"); like ($output, qr/[12] task/, "$ut: 1/2 due task(s) are displayed");