- Supports 'color.uda.<name>.<value>' (TW-1428)
This commit is contained in:
Johannes Schlatow 2014-10-10 14:19:07 +02:00 committed by Paul Beckingham
parent aa89422b6f
commit 2c7013cc1c
4 changed files with 25 additions and 3 deletions

View file

@ -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);