TI-64: Command 'stop' with date before current interval's start date causes segfault

- Show error message if stop date is before current interval's start date
- Add test for this use case
This commit is contained in:
Thomas Lauf 2017-02-09 09:18:55 +01:00 committed by Paul Beckingham
parent 403b1c6f5e
commit e505129d5c
2 changed files with 11 additions and 0 deletions

View file

@ -65,6 +65,12 @@ class TestStop(TestCase):
self.assertIn('0100Z', j[0]['start'])
self.assertIn('0200Z', j[0]['end'])
def test_invalid_stop(self):
"""Verify stop date after start date is an error"""
self.t("start 20160516T100200")
code, out, err = self.t.runError("stop 20160516T090100")
self.assertIn("The end of a date range must be after the start.", err)
def test_stop_all(self):
"""Start three tags, stop"""
self.t("start 5mins ago one two three")