mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Calendar coloring
- Added 1 new color configuration variables to colorize weekend days in the calendar: 'calendar.color.weekend'. - Changed the default colors in the calendar.
This commit is contained in:
parent
d552b208dd
commit
7ef5233547
6 changed files with 41 additions and 24 deletions
|
@ -30,7 +30,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 58;
|
||||
use Test::More tests => 60;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'cal.rc')
|
||||
|
@ -59,7 +59,7 @@ if ( $day <= 9)
|
|||
|
||||
# task cal and task cal y
|
||||
my $output = qx{../task rc:cal.rc rc._forcecolor:on cal};
|
||||
like ($output, qr/\[36m$day/, 'Current day is highlighted');
|
||||
like ($output, qr/\[30;46m$day/, 'Current day is highlighted');
|
||||
like ($output, qr/$month\w+?\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');
|
||||
|
@ -88,17 +88,19 @@ $output = qx{../task rc:cal.rc rc._forcecolor:on cal due};
|
|||
unlike ($output, qr/April 2019/, 'April 2019 is not displayed');
|
||||
like ($output, qr/May 2019/, 'May 2019 is displayed');
|
||||
unlike ($output, qr/January 2020/, 'January 2020 is not displayed');
|
||||
like ($output, qr/43m15/, 'Task 1 is color-coded due');
|
||||
like ($output, qr/30;42m15/, 'Task 1 is color-coded due');
|
||||
$output = qx{../task rc:cal.rc rc._forcecolor:on cal due y};
|
||||
like ($output, qr/43m23/, 'Task 2 is color-coded due');
|
||||
like ($output, qr/30;42m23/, 'Task 2 is color-coded due');
|
||||
like ($output, qr/April 2020/, 'April 2020 is displayed');
|
||||
unlike ($output, qr/May 2020/, 'May 2020 is not displayed');
|
||||
qx{../task rc:cal.rc ls};
|
||||
qx{../task rc:cal.rc del 1-3};
|
||||
qx{../task rc:cal.rc add due:20080408 three};
|
||||
$output = qx{../task rc:cal.rc rc._forcecolor:on cal due};
|
||||
like ($output, qr/April 2008/, 'April 2008 is displayed');
|
||||
like ($output, qr/41m 8/, 'Task 3 is color-coded overdue');
|
||||
like ($output, qr/April 2008/, 'April 2008 is displayed');
|
||||
like ($output, qr/41m 8/, 'Task 3 is color-coded overdue');
|
||||
like ($output, qr/30;47m19/, 'Saturday April 19, 2008 is color-coded');
|
||||
like ($output, qr/30;47m20/, 'Sunday April 20, 2008 is color-coded');
|
||||
|
||||
# task cal 2016
|
||||
$output = qx{../task rc:cal.rc rc.weekstart:Monday cal 2016};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue