mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 14:38:34 +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
|
@ -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