Fix repetition on dates with start+end times.

This commit is contained in:
Sergio Martínez Portela 2022-06-05 23:31:48 +02:00
parent 63bb1e67e0
commit a67bde58d0
3 changed files with 28 additions and 2 deletions

View file

@ -19,3 +19,6 @@ SCHEDULED: <2020-12-12 Sáb> CLOSED: <2020-12-13 Dom> DEADLINE: <2020-12-14 Lun>
** Scheduled for time range
SCHEDULED: <2020-12-15 Mar 00:05-00:10>
** Scheduled periodic
SCHEDULED: <2020-12-15 Mar 00:05-00:10 ++1w>

View file

@ -418,6 +418,20 @@ class TestSerde(unittest.TestCase):
Timestamp(True, 2020, 12, 15, "Mar", 0, 10),
)
hl_schedule_range = hl.children[1]
self.assertEqual(
hl_schedule_range.scheduled.time,
Timestamp(True, 2020, 12, 15, "Mar", 0, 5, '++1w')
)
self.assertEqual(
hl_schedule_range.scheduled.end_time,
Timestamp(True, 2020, 12, 15, "Mar", 0, 10),
)
self.assertEqual(
hl_schedule_range.scheduled.repetition,
'++1w',
)
def test_update_info_file_05(self):
with open(os.path.join(DIR, "05-dates.org")) as f:
orig = f.read()