mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdStart: Do not silently fail if tags match
It was possible previously to start an interval with a filter earlier than the current filter, and if the tags matched, the command would report success without actually moving the start time. Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
parent
356f20c9de
commit
6a52a412ba
2 changed files with 11 additions and 1 deletions
|
@ -257,6 +257,11 @@ class TestStart(TestCase):
|
|||
self.assertClosedInterval(j[0])
|
||||
self.assertOpenInterval(j[1])
|
||||
|
||||
def test_start_will_not_silently_fail_to_adjust_with_same_tags(self):
|
||||
"""Start will not silently fail when tags are the same and time is earlier"""
|
||||
self.t("start 1h ago proja")
|
||||
code, out, err = self.t.runError("start 2h ago proja")
|
||||
self.assertIn("The end of a date range must be after the start.", err)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue