From 72763f2a2ba2b928b047c94c1225509716f61a3e Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 10 May 2010 21:59:10 +0200 Subject: [PATCH] Bug Fix - wrong regexp in cal.t when matching '$month $year' --- src/tests/cal.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/cal.t b/src/tests/cal.t index 734045e03..a92f96494 100755 --- a/src/tests/cal.t +++ b/src/tests/cal.t @@ -67,7 +67,7 @@ else { like ($output, qr/\[30;46m$day/, 'Current day is highlighted'); } -like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed'); +like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed'); $output = qx{../task rc:cal.rc add zero}; unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present'); unlike ($output, qr/\[43m\d+/, 'No due tasks are present'); @@ -76,17 +76,17 @@ like ($output, qr/Su Mo Tu/, 'Week starts on Sunday'); $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'); +like ($output, qr/$month\S*?\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'); +like ($output, qr/$prevmonth\S*?\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'); +unlike ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are not displayed'); # task cal due and task cal due y qx{../task rc:cal.rc add due:20190515 one}; @@ -210,7 +210,7 @@ my $duedate = $year.$mon.$day; qx{../task rc:details.rc add due:$duedate rc.monthsperline:1 nine}; $output = qx{../task rc:details.rc cal}; -like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed'); +like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed'); like ($output, qr/$duedate/, 'Due date on current day is displayed'); like ($output, qr/1 task/, '1 due task is displayed');