mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Color
- Supports 'color.uda.<name>.<value>' (TW-1428)
This commit is contained in:
parent
aa89422b6f
commit
2c7013cc1c
4 changed files with 25 additions and 3 deletions
|
@ -40,17 +40,22 @@ if (open my $fh, '>', 'color.rc')
|
|||
"color.uda.x=red\n",
|
||||
"uda.x.type=numeric\n",
|
||||
"uda.x.label=X\n",
|
||||
"uda.y.type=numeric\n",
|
||||
"uda.y.label=Y\n",
|
||||
"color.uda.y.4=blue\n",
|
||||
"color.alternate=\n",
|
||||
"_forcecolor=1\n";
|
||||
close $fh;
|
||||
}
|
||||
|
||||
qx{../src/task rc:color.rc add one 2>&1};
|
||||
qx{../src/task rc:color.rc add two x:3 2>&1};
|
||||
qx{../src/task rc:color.rc add two x:3 y:2 2>&1};
|
||||
qx{../src/task rc:color.rc add three y:4 2>&1};
|
||||
my $output = qx{../src/task rc:color.rc list 2>/dev/null};
|
||||
|
||||
unlike ($output, qr/ \033\[32m .* one .* \033\[0m /x, 'No color.uda');
|
||||
like ($output, qr/ \033\[31m .* two .* \033\[0m /x, 'Found color.uda');
|
||||
like ($output, qr/ \033\[34m .* three .* \033\[0m /x, 'Found color.uda.x');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data color.rc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue