mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
Bug #745
- Fixed Bug #745, which allows projects names with spaces, provided the values are quoted (thanks to Duane Waddle). - Added unit test.
This commit is contained in:
parent
76f11cb73c
commit
4f4a04738f
4 changed files with 10 additions and 8 deletions
|
@ -42,6 +42,10 @@
|
||||||
truncated to a page.
|
truncated to a page.
|
||||||
+ Fixed Bug #732, which fixes misleading messages and documentation for
|
+ Fixed Bug #732, which fixes misleading messages and documentation for
|
||||||
merge/push/pull URIs (thanks to Tomas Cech).
|
merge/push/pull URIs (thanks to Tomas Cech).
|
||||||
|
+ Fixed Bug #745, which allows projects names with spaces, provided the values
|
||||||
|
are quoted (thanks to Duane Waddle).
|
||||||
|
+ Applied patch for Bug #746, which added missing documentation for the 'entry'
|
||||||
|
report column (thanks to Duane Waddle).
|
||||||
|
|
||||||
# Untracked Bugs, biggest first.
|
# Untracked Bugs, biggest first.
|
||||||
|
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ New Features in taskwarrior 2.0.0
|
||||||
- Attribute modifiers may be prefixed with '~' to return the opposite of a
|
- Attribute modifiers may be prefixed with '~' to return the opposite of a
|
||||||
filter's results.
|
filter's results.
|
||||||
- Status attribute can now be used in report.
|
- Status attribute can now be used in report.
|
||||||
|
- Project names may now contain spaces.
|
||||||
|
|
||||||
Please refer to the ChangeLog file for full details. There are too many to
|
Please refer to the ChangeLog file for full details. There are too many to
|
||||||
list here.
|
list here.
|
||||||
|
|
|
@ -355,13 +355,6 @@ bool Att::validNameValue (
|
||||||
name +
|
name +
|
||||||
"\" is not an attribute you may modify directly.";
|
"\" is not an attribute you may modify directly.";
|
||||||
|
|
||||||
// Thirdly, make sure the value has the expected form or values.
|
|
||||||
if (name == "project")
|
|
||||||
{
|
|
||||||
if (!noSpaces (value))
|
|
||||||
throw std::string ("The '") + name + "' attribute may not contain spaces.";
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (name == "priority")
|
else if (name == "priority")
|
||||||
{
|
{
|
||||||
if (value != "")
|
if (value != "")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 13;
|
use Test::More tests => 14;
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'pro.rc')
|
if (open my $fh, '>', 'pro.rc')
|
||||||
|
@ -62,6 +62,10 @@ $output = qx{../src/task rc:pro.rc 3 pro:bar};
|
||||||
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 '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');
|
like ($output, qr/The project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project');
|
||||||
|
|
||||||
|
# Test projects with spaces in them.
|
||||||
|
$output = qx{../src/task rc:pro.rc 3 pro:"foo bar"};
|
||||||
|
like ($output, qr/The project 'foo bar' has changed\./, 'project with spaces');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
ok (!-r 'pending.data', 'Removed pending.data');
|
ok (!-r 'pending.data', 'Removed pending.data');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue