Commit e4cafc4c authored by Bram Schoenmakers's avatar Bram Schoenmakers

Stop processing expressions when a match was found

When a filter with a creation date matches, don't process expression
with the remaining filters.
parent 9c2024ea
......@@ -379,6 +379,13 @@ class ListCommandTest(CommandTest):
self.assertEqual(self.output, "| 1| (A) item 1\n")
self.assertEqual(self.errors, "")
def test_list47(self):
command = ListCommand(["created:2015-11-05"], self.todolist, self.out, self.error)
command.execute()
self.assertEqual(self.output, "| 1| (C) 2015-11-05 Foo @Context2 Not@Context +Project1 Not+Project\n")
self.assertEqual(self.errors, "")
def test_help(self):
command = ListCommand(["help"], self.todolist, self.out, self.error)
command.execute()
......
......@@ -62,6 +62,7 @@ class ExpressionCommand(Command):
for match, _filter in Filter.MATCHES:
if re.match(match, arg):
argfilter = _filter(arg)
break
if not argfilter:
argfilter = Filter.GrepFilter(arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment