mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Feedback
- Modified feedback when the number of pending tasks in a project changes (thanks to Peter De Poorter).
This commit is contained in:
parent
f8d8d2f6b5
commit
01bb76b3b6
3 changed files with 9 additions and 9 deletions
2
AUTHORS
2
AUTHORS
|
@ -62,4 +62,4 @@ suggestions:
|
|||
Dirk Deimeke
|
||||
Michelle Crane
|
||||
Elizabeth Maxson
|
||||
|
||||
Peter De Poorter
|
||||
|
|
|
@ -2863,7 +2863,7 @@ std::string onProjectChange (Task& task, bool scope /* = true */)
|
|||
if (project != "")
|
||||
{
|
||||
if (scope)
|
||||
msg << "The scope of project '"
|
||||
msg << "The project '"
|
||||
<< project
|
||||
<< "' has changed. ";
|
||||
|
||||
|
|
|
@ -41,26 +41,26 @@ if (open my $fh, '>', 'pro.rc')
|
|||
|
||||
# Test the project status numbers.
|
||||
my $output = qx{../task rc:pro.rc add one pro:foo};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(1 of 1 tasks remaining\)\./, 'add one');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(1 of 1 tasks remaining\)\./, 'add one');
|
||||
|
||||
$output = qx{../task rc:pro.rc add two pro:'foo'};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(2 of 2 tasks remaining\)\./, 'add two');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(2 of 2 tasks remaining\)\./, 'add two');
|
||||
|
||||
$output = qx{../task rc:pro.rc add three pro:'foo'};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(3 of 3 tasks remaining\)\./, 'add three');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(3 of 3 tasks remaining\)\./, 'add three');
|
||||
|
||||
$output = qx{../task rc:pro.rc add four pro:'foo'};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(4 of 4 tasks remaining\)\./, 'add four');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(4 of 4 tasks remaining\)\./, 'add four');
|
||||
|
||||
$output = qx{../task rc:pro.rc 1 done};
|
||||
like ($output, qr/Project 'foo' is 25% complete \(3 of 4 tasks remaining\)\./, 'done one');
|
||||
|
||||
$output = qx{../task rc:pro.rc 2 delete};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 33% complete \(2 of 3 tasks remaining\)\./, 'delete two');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 33% complete \(2 of 3 tasks remaining\)\./, 'delete two');
|
||||
|
||||
$output = qx{../task rc:pro.rc 3 pro:bar};
|
||||
like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 50% complete \(1 of 2 tasks remaining\)\./, 'change project');
|
||||
like ($output, qr/The scope of project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project');
|
||||
like ($output, qr/The project 'foo' has changed\. Project 'foo' is 50% complete \(1 of 2 tasks remaining\)\./, 'change project');
|
||||
like ($output, qr/The project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue