Commit 42ddf3ef authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add tests for negative values.

parent e93393b9
......@@ -286,6 +286,16 @@ class FilterTest(unittest.TestCase):
self.assertEquals(todolist_to_string(filtered_todos),
todolist_to_string(reference))
def test_filter30(self):
todos = load_file('data/FilterTest3.txt')
otf = Filter.OrdinalTagFilter('value:>-8')
filtered_todos = otf.filter(todos)
reference = load_file('data/FilterTest13-result.txt')
self.assertEquals(todolist_to_string(filtered_todos),
todolist_to_string(reference))
class OrdinalTagFilterTest(unittest.TestCase):
def setUp(self):
today = date.today()
......
Tag with some value:8
Tag with negative value:-7
Tag with some value:8
Tag with some other value:16
Tag with negative value:-7
......@@ -3,3 +3,4 @@ Tag with future due date due:2030-01-01
Tag with some value:8
Tag with some other value:16
Tag with nonsense value:nonsense
Tag with negative value:-7
Tag with some value:8
Tag with negative value:-7
Tag with some value:8
Tag with some other value:16
Tag with negative value:-7
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