mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug Fix - concatenation of colons in description
- When a task description contained a colon, the two words preceding the colon were concatenated. For example, "aa bb:cc dd" gets concatenated to "aabb:cc dd". - Added unit to test to prevent regression. - Updated documentation.
This commit is contained in:
parent
579232b7ea
commit
1cbec205f1
4 changed files with 23 additions and 4 deletions
|
@ -34,6 +34,8 @@
|
|||
is a recurring task. This column can be added to any custom report.
|
||||
+ Added new column 'tag_indicator' that displays a '+' if the task
|
||||
has any tags. This column can be added to any custom report.
|
||||
+ Fixed bug where sometimes a task description was concatenated oddly if
|
||||
there was a colon somewhere in the description.
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
|
|
@ -139,6 +139,8 @@
|
|||
is a recurring task. This column can be added to any custom report.
|
||||
<li>Added new column 'tag_indicator' that displays a '+' if the task
|
||||
has any tags. This column can be added to any custom report.
|
||||
<li>Fixed bug where sometimes a task description was concatenated oddly if
|
||||
there was a colon somewhere in the description.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -443,7 +443,11 @@ void parse (
|
|||
// If it is not a valid attribute, then allow the argument as part of
|
||||
// the description.
|
||||
else
|
||||
{
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += arg;
|
||||
}
|
||||
}
|
||||
|
||||
// Substitution of description text.
|
||||
|
@ -462,7 +466,7 @@ void parse (
|
|||
{
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += std::string (arg);
|
||||
descCandidate += arg;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,7 +475,7 @@ void parse (
|
|||
{
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += std::string (arg);
|
||||
descCandidate += arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
use Test::More tests => 6;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'bug_concat.rc')
|
||||
|
@ -47,7 +47,6 @@ if (open my $fh, '>', 'bug_concat.rc')
|
|||
# Thisisanewdescription
|
||||
|
||||
qx{../task rc:bug_concat.rc add This is the original text};
|
||||
|
||||
my $output = qx{../task rc:bug_concat.rc info 1};
|
||||
like ($output, qr/Description\s+This is the original text\n/, 'original correct');
|
||||
|
||||
|
@ -55,6 +54,18 @@ qx{../task rc:bug_concat.rc 1 This is the modified text};
|
|||
$output = qx{../task rc:bug_concat.rc info 1};
|
||||
like ($output, qr/Description\s+This is the modified text\n/, 'modified correct');
|
||||
|
||||
# When a task is added like this:
|
||||
#
|
||||
# % task add aaa bbb:ccc ddd
|
||||
#
|
||||
# The description is concatenated thus:
|
||||
#
|
||||
# aaabbb:ccc ddd
|
||||
|
||||
qx{../task rc:bug_concat.rc add aaa bbb:ccc ddd};
|
||||
$output = qx{../task rc:bug_concat.rc info 2};
|
||||
like ($output, qr/Description\s+aaa bbb:ccc ddd\n/, 'properly concatenated');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue