mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdStart: Stop previous interval at given start time
- End time of previous open interval now set to start time given on cmd line in CmdStart.
This commit is contained in:
parent
3be4e442bf
commit
07e777b62c
2 changed files with 15 additions and 2 deletions
10
test/start.t
10
test/start.t
|
@ -79,6 +79,16 @@ class TestStart(TestCase):
|
|||
self.assertIn("Recorded foo", out)
|
||||
self.assertIn("Tracking bar", out)
|
||||
|
||||
def test_start_with_open_interval_timed(self):
|
||||
"""Test timed start with already open interval, which should be auto-stopped
|
||||
at given datetime"""
|
||||
self.t("start 2016-01-01T00:00:00 foo")
|
||||
code, out, err = self.t("start 2016-01-01T01:00:00 bar")
|
||||
self.assertIn("Recorded foo", out)
|
||||
self.assertIn("Tracking bar", out)
|
||||
|
||||
self.assertIn("Ended 01:00:00",out)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue