X.P.OrgMode: More strictly enfore +s and +d ending with a space

Fixes: https://github.com/xmonad/xmonad-contrib/actions/runs/8772077289/job/24070588575
This commit is contained in:
Tony Zorman
2024-04-27 19:42:25 +02:00
parent cab938f07b
commit 8efff53a06
2 changed files with 9 additions and 2 deletions

View File

@@ -61,6 +61,13 @@ spec = do
`shouldBe` Just (Scheduled "todo" (Time {date = Today, tod = Just $ MomentInTime(HHMM 12 0)}) NoPriority)
pInput "todo +d 14:05 #B"
`shouldBe` Just (Deadline "todo" (Time {date = Today, tod = Just $ MomentInTime(HHMM 14 5)}) B)
it "parses `blah+d` and `blah +d` as normal messages, but `blah +d ` as a deadline for today" $ do
pInput "blah+d"
`shouldBe` Just (NormalMsg "blah+d" NoPriority)
pInput "blah +d"
`shouldBe` Just (NormalMsg "blah +d" NoPriority)
pInput "blah +d "
`shouldBe` Just (Deadline "blah" (Time {date = Today, tod = Nothing}) NoPriority)
context "no priority#b" $ do
it "parses to the correct thing" $