mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug - #489 - tags.none: is not filtering tagless tasks
- Context::autoFilter was suppressing 'tags' filter terms due to the +tag/-tag syntax, which we now know only augments attribute modifiers, and doesn't replace them.
This commit is contained in:
parent
0dd71612e4
commit
87158f505a
3 changed files with 66 additions and 6 deletions
|
@ -72,6 +72,7 @@
|
|||
after a due date (thanks to T. Charles Yun).
|
||||
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
||||
also now supports $ and #.
|
||||
+ Fixed bug #489, which caused the filter 'tags.none:' to fail.
|
||||
+ Fixed problem with command line configuration overrides that had no
|
||||
values.
|
||||
+ Fixed problem with the 'undo' command not observing the rc.color or the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
|
@ -839,11 +839,8 @@ void Context::autoFilter (Att& a, Filter& f)
|
|||
{
|
||||
}
|
||||
|
||||
// The mechanism for filtering on tags is +/-<tag>.
|
||||
// Do not handle here - see below.
|
||||
else if (a.name () == "tags")
|
||||
{
|
||||
}
|
||||
// Note: Tags are handled via the +/-<tag> syntax, but also via attribute
|
||||
// modifiers.
|
||||
|
||||
// Generic attribute matching.
|
||||
else
|
||||
|
|
62
src/tests/bug.489.t
Executable file
62
src/tests/bug.489.t
Executable file
|
@ -0,0 +1,62 @@
|
|||
#! /usr/bin/perl
|
||||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
## All rights reserved.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify it under
|
||||
## the terms of the GNU General Public License as published by the Free Software
|
||||
## Foundation; either version 2 of the License, or (at your option) any later
|
||||
## version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
## details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License along with
|
||||
## this program; if not, write to the
|
||||
##
|
||||
## Free Software Foundation, Inc.,
|
||||
## 51 Franklin Street, Fifth Floor,
|
||||
## Boston, MA
|
||||
## 02110-1301
|
||||
## USA
|
||||
##
|
||||
################################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 7;
|
||||
|
||||
# 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 #489 - tags.none: is not filtering tagless tasks
|
||||
qx{../task rc:bug.rc add with +tag};
|
||||
qx{../task rc:bug.rc add without};
|
||||
my $output = qx{../task rc:bug.rc list tags.none:};
|
||||
unlike ($output, qr/with /, 'tags.none: skips tagged');
|
||||
like ($output, qr/without/, 'tags.none: finds tagless');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
||||
unlink 'completed.data';
|
||||
ok (!-r 'completed.data', 'Removed completed.data');
|
||||
|
||||
unlink 'undo.data';
|
||||
ok (!-r 'undo.data', 'Removed undo.data');
|
||||
|
||||
unlink 'bug.rc';
|
||||
ok (!-r 'bug.rc', 'Removed bug.rc');
|
||||
|
||||
exit 0;
|
Loading…
Add table
Add a link
Reference in a new issue