- Fixed bug #1110, which did not treat 'status:Completed' the same
  as 'status:completed' (thanks to Aikido Guy).
This commit is contained in:
Scott Kostyshak 2012-12-31 04:21:02 -05:00 committed by Paul Beckingham
parent 28523e97c6
commit 0f4a366752
3 changed files with 67 additions and 2 deletions

View file

@ -36,8 +36,8 @@ Features
+ Added new export script: export-tsv.pl.
Bugs
+ Fixed bug #947, #1031, which kept expanding aliases after the '--' operator
(thanks to Jim B).
+ Fixed bug #1110, which did not treat 'status:Completed' the same
as 'status:completed' (thanks to Aikido Guy).
+ Fixed bug #1038, which prints blank lines with bulk changes and when the
verbose attributes does not specify it. Lines do a better separation between
each changes also.

View file

@ -533,6 +533,14 @@ void E9::operator_equal (
: "false";
}
// Case-insensitive comparison for status. Fixes #1110.
else if (left._raw == "status")
{
result._value = compare (left._value, right._value, false)
? "true"
: "false";
}
// Regular equality matching.
else
{

57
test/bug.1110.t Executable file
View file

@ -0,0 +1,57 @@
#! /usr/bin/env perl
################################################################################
## taskwarrior - a command line task list manager.
##
## Copyright 2006-2012, Paul Beckingham, Federico Hernandez.
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included
## in all copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
## SOFTWARE.
##
## http://www.opensource.org/licenses/mit-license.php
##
################################################################################
use strict;
use warnings;
use Test::More tests => 3;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}
# Bug 1110: reports print "Completed" but "Completed" != "completed"
qx{../src/task rc:bug.rc add ToBeCompleted 2>&1};
qx{../src/task rc:bug.rc 1 done 2>&1};
my $output = qx{../src/task all status:Completed rc:bug.rc 2>&1};
like ($output, qr/ToBeCompleted/, 'status:Completed returns completed tasks');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch.key' &&
! -r 'bug.rc', 'Cleanup');
exit 0;