Fixed 2 unit tests that behaved wrong at the end/beginning of a year.
This commit is contained in:
@@ -68,7 +68,15 @@ $output = qx{../task rc:cal.rc rc.weekstart:Monday cal};
|
||||
like ($output, qr/Fr Sa Su/, 'Week starts on Monday');
|
||||
$output = qx{../task rc:cal.rc cal y};
|
||||
like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed');
|
||||
if ( $month eq "Jan")
|
||||
{
|
||||
$nextyear = $nextyear - 1;
|
||||
}
|
||||
like ($output, qr/$prevmonth\w+?\s+?$nextyear/, 'Month and year one year ahead are displayed');
|
||||
if ( $month eq "Jan")
|
||||
{
|
||||
$nextyear = $nextyear + 1;
|
||||
}
|
||||
unlike ($output, qr/$month\w+?\s+?$nextyear/, 'Current month and year ahead are not displayed');
|
||||
|
||||
# task cal due and task cal due y
|
||||
|
||||
Reference in New Issue
Block a user