mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TW-1468
- TW-1468 Filtering for project and description has issues (thanks to Richard Boß).
This commit is contained in:
parent
9a95696872
commit
206323dd6a
3 changed files with 40 additions and 1 deletions
|
@ -186,6 +186,8 @@
|
||||||
- TW-1460 Empty due dates lead to endless loop.
|
- TW-1460 Empty due dates lead to endless loop.
|
||||||
- TW-1463 A few more problems with special characters in filters, pluses,
|
- TW-1463 A few more problems with special characters in filters, pluses,
|
||||||
question marks, and braces (thanks to Ralph Bean).
|
question marks, and braces (thanks to Ralph Bean).
|
||||||
|
- TW-1468 Filtering for project and description has issues (thanks to Richard
|
||||||
|
Boß).
|
||||||
- Added new holidays.xy-XY.rc definition files
|
- Added new holidays.xy-XY.rc definition files
|
||||||
- Removed deprecated 'echo.command' setting, in favor of the 'header' and
|
- Removed deprecated 'echo.command' setting, in favor of the 'header' and
|
||||||
'affected' verbosity tokens.
|
'affected' verbosity tokens.
|
||||||
|
|
|
@ -442,8 +442,8 @@ void CLI::analyze (bool parse /* = true */, bool strict /* = false */)
|
||||||
desugarFilterPatterns ();
|
desugarFilterPatterns ();
|
||||||
findOperators ();
|
findOperators ();
|
||||||
findAttributes ();
|
findAttributes ();
|
||||||
insertJunctions ();
|
|
||||||
desugarFilterPlainArgs ();
|
desugarFilterPlainArgs ();
|
||||||
|
insertJunctions (); // Deliberately after all desugar calls.
|
||||||
|
|
||||||
// Decompose the elements for MODIFICATIONs.
|
// Decompose the elements for MODIFICATIONs.
|
||||||
decomposeModAttributes ();
|
decomposeModAttributes ();
|
||||||
|
|
37
test/tw-1468.t
Executable file
37
test/tw-1468.t
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env python2.7
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
# Ensure python finds the local simpletap module
|
||||||
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
from basetest import Task, TestCase, Taskd, ServerTestCase
|
||||||
|
|
||||||
|
class Test1468(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.t = Task()
|
||||||
|
self.t(('add', 'project:home', 'buy milk'))
|
||||||
|
self.t(('add', 'project:home', 'mow the lawn'))
|
||||||
|
|
||||||
|
def test_single_attribute_filter(self):
|
||||||
|
"""Single attribute filter (project:home)"""
|
||||||
|
code, out, err = self.t(('list', 'project:home'))
|
||||||
|
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
|
||||||
|
self.assertIn ('buy milk', out)
|
||||||
|
self.assertIn ('mow the lawn', out)
|
||||||
|
|
||||||
|
def test_attribute_and_implicit_search_filter(self):
|
||||||
|
"""Attribute and implicit search filter (project:home lawn)"""
|
||||||
|
code, out, err = self.t(('list', 'project:home', 'lawn'))
|
||||||
|
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
|
||||||
|
self.assertNotIn ('buy milk', out)
|
||||||
|
self.assertIn ('mow the lawn', out)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from simpletap import TAPTestRunner
|
||||||
|
unittest.main(testRunner=TAPTestRunner())
|
||||||
|
|
||||||
|
# vim: ai sts=4 et sw=4
|
Loading…
Add table
Add a link
Reference in a new issue