Test: Merged bug.886.t into dateformat.t

This commit is contained in:
Paul Beckingham 2015-10-23 08:35:13 -04:00
parent b5b005d01f
commit faa6b806d2
2 changed files with 17 additions and 60 deletions

View file

@ -56,6 +56,23 @@ class TestDateformat(TestCase):
code, out, err = self.t("xxx rc.dateformat:YMDTHNS")
self.assertEqual(out.count("20150704T000000"), 3)
class TestBug886(TestCase):
def setUp(self):
"""Executed before each test in the class"""
self.t = Task()
def test_invalid_day(self):
"""886: Test invalid day synonym
Bug 886: tw doesn't warn the user if, e.g., a weekday cannot be resolved properly
"""
code, out, err =self.t("add one due:sun")
self.assertIn("Created task 1.", out)
code, out, err =self.t.runError("add two due:donkey")
self.assertIn("'donkey' is not a valid date", err)
if __name__ == "__main__":
from simpletap import TAPTestRunner