From c847f88b98dd1de8d0cc82f43bb963088a757921 Mon Sep 17 00:00:00 2001 From: Tommy Jollyboat <11634808+ComedyTomedy@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:49:42 +0100 Subject: [PATCH] Test: Add tests for numerical priorities --- tests/data.org | 6 +++--- tests/test-org-ql.el | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/data.org b/tests/data.org index ec42ce9..b138651 100644 --- a/tests/data.org +++ b/tests/data.org @@ -62,12 +62,12 @@ SCHEDULED: <2017-07-05 Wed 18:00> :Effort: 5 :END: -* TODO [#C] Get haircut :personal:@town: +* TODO [#Z] Get haircut :personal:@town: 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.) -* TODO [#B] Internet :bills: +* TODO [#1] Internet :bills: DEADLINE: <2017-07-21 Fri -1m> * TODO [#A] Spaceship lease :bills:spaceship: @@ -76,7 +76,7 @@ DEADLINE: <2017-08-01 Tue -1m> :agenda-group: bills :END: -* TODO [#B] Fix flux capacitor :spaceship:shopping:@computer: +* TODO [#9] Fix flux capacitor :spaceship:shopping:@computer: SCHEDULED: <2017-07-05 Wed> If I don't, the frobnicator will probably fall off halfway to Mars... diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 923ec66..d6c80d1 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1324,13 +1324,19 @@ with keyword arg NOW in PLIST." '("Take over the moon" "Get haircut"))) (org-ql-it "<= a priority" (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-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-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)"