From 4f14c529b02958530d84291bee6b260969a72d21 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 21 Aug 2021 09:32:03 -0400 Subject: [PATCH] tests: Add test for TW #2577 This is already fixed on 2.6.0 thanks to #2405, but it never hurts to have more tests. Closes #2577. --- test/filter.t | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/filter.t b/test/filter.t index 7bc12c41b..f06999058 100755 --- a/test/filter.t +++ b/test/filter.t @@ -1130,6 +1130,24 @@ class TestBug1915(TestCase): self.assertIn("thingB", out) self.assertNotIn("thingC", out) + +class Test2577(TestCase): + def setUp(self): + self.t = Task() + + def test_filtering_for_datetime_like(self): + """2577: Check that filtering for datetime-like project names works""" + self.t('add one pro:sat') # looks like "saturday" + self.t('add two pro:whatever') + + # This should not fail (fails on 2.5.3) + code, out, err = self.t('pro:sat') + + # Assert expected output, but the crucial part of this test is success + # of the call above + self.assertIn("one", out) + + if __name__ == "__main__": from simpletap import TAPTestRunner unittest.main(testRunner=TAPTestRunner())