Test: Add tests for numerical priorities

This commit is contained in:
Tommy Jollyboat 2024-10-12 11:49:42 +01:00
parent f97a13a130
commit c847f88b98
2 changed files with 12 additions and 6 deletions

View file

@ -62,12 +62,12 @@ SCHEDULED: <2017-07-05 Wed 18:00>
:Effort: 5 :Effort: 5
:END: :END:
* TODO [#C] Get haircut :personal:@town: * TODO [#Z] Get haircut :personal:@town:
SCHEDULED: <2017-07-05 Wed> SCHEDULED: <2017-07-05 Wed>
Should probably do this before I take over the world. Want to look my best. (Not that it will matter once I'm in charge.) Should probably do this before I take over the world. Want to look my best. (Not that it will matter once I'm in charge.)
* TODO [#B] Internet :bills: * TODO [#1] Internet :bills:
DEADLINE: <2017-07-21 Fri -1m> DEADLINE: <2017-07-21 Fri -1m>
* TODO [#A] Spaceship lease :bills:spaceship: * TODO [#A] Spaceship lease :bills:spaceship:
@ -76,7 +76,7 @@ DEADLINE: <2017-08-01 Tue -1m>
:agenda-group: bills :agenda-group: bills
:END: :END:
* TODO [#B] Fix flux capacitor :spaceship:shopping:@computer: * TODO [#9] Fix flux capacitor :spaceship:shopping:@computer:
SCHEDULED: <2017-07-05 Wed> SCHEDULED: <2017-07-05 Wed>
If I don't, the frobnicator will probably fall off halfway to Mars... If I don't, the frobnicator will probably fall off halfway to Mars...

View file

@ -1324,13 +1324,19 @@ with keyword arg NOW in PLIST."
'("Take over the moon" "Get haircut"))) '("Take over the moon" "Get haircut")))
(org-ql-it "<= a priority" (org-ql-it "<= a priority"
(org-ql-expect ('(priority <= "B")) (org-ql-expect ('(priority <= "B"))
'("Take over Mars" "Take over the moon" "Renew membership in supervillain club" "Learn universal sign language" "Get haircut" "Internet" "Fix flux capacitor"))) '("Take over Mars" "Take over the moon" "Renew membership in supervillain club" "Learn universal sign language" "Get haircut")))
(org-ql-it "> a priority" (org-ql-it "> a priority"
(org-ql-expect ('(priority > "B")) (org-ql-expect ('(priority > "B"))
'("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Spaceship lease"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Internet" "Spaceship lease" "Fix flux capacitor")))
(org-ql-it ">= a priority" (org-ql-it ">= a priority"
(org-ql-expect ('(priority >= "B")) (org-ql-expect ('(priority >= "B"))
'("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Renew membership in supervillain club" "Learn universal sign language" "Internet" "Spaceship lease" "Fix flux capacitor")))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Renew membership in supervillain club" "Learn universal sign language" "Internet" "Spaceship lease" "Fix flux capacitor")))
(org-ql-it "compare numerical priorities"
(org-ql-expect ('(priority > "5"))
'("Internet")))
(org-ql-it "compare double-digit numerical priorities"
(org-ql-expect ('(priority > "60"))
'("Internet" "Fix flux capacitor"))))
(describe "(property)" (describe "(property)"