mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Merge branch '1.9.3' of tasktools.org:task into 1.9.3
This commit is contained in:
commit
f553915b2f
8 changed files with 131 additions and 14 deletions
|
@ -48,6 +48,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include "Context.h"
|
||||
#include "API.h"
|
||||
|
||||
|
@ -223,7 +224,8 @@ static int api_task_debug_message (lua_State* L)
|
|||
static int api_task_exit (lua_State* L)
|
||||
{
|
||||
// TODO Is this the correct exception? How does the shell handle this?
|
||||
throw std::string ("Exiting.");
|
||||
std::cout << "Exiting." << std::endl;
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1559,7 +1559,7 @@ void TDB::merge (const std::string& mergeFile)
|
|||
{
|
||||
std::cout << "Merging new remote task "
|
||||
<< (useColor ? colorAdded.colorize (uuid) : uuid)
|
||||
<< " \"" << cutOff (tmod.getBefore ().get ("description"), 10) << "\""
|
||||
<< " \"" << cutOff (tmod.getAfter ().get ("description"), 10) << "\""
|
||||
<< "\n";
|
||||
|
||||
// remove the \n from composeF4() string
|
||||
|
|
|
@ -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