From 51bd90bb03cd501e2ecab73a1e22975e33b288ab Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 5 Jul 2021 02:50:00 -0500 Subject: [PATCH] WIP: Restore original test and use ts-apply The previous change passes, so this should, too. But I don't see how ts.el could be causing a void-variable error in an org-ql macro expansion, so maybe these are separate problems... --- tests/test-org-ql.el | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 1029fcd..5771cca 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -512,10 +512,22 @@ with keyword arg NOW in PLIST." ;; :from ,(make-ts :unix 1546322400.0) ;; :to ,(make-ts :unix 1546408799.0)))) - (expect (org-ql--normalize-query '(ts-active :on "2019-01-01")) - :to-equal `(ts :type active - :from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01")) - :to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01")))) + (expect (org-ql--normalize-query '(or (ts-active :on "2019-01-01") + (ts-a :on "2019-01-01") + (ts-inactive :on "2019-01-01") + (ts-i :on "2019-01-01"))) + :to-equal `(or (ts :type active + :from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01")) + :to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01"))) + (ts :type active + :from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01")) + :to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01"))) + (ts :type inactive + :from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01")) + :to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01"))) + (ts :type inactive + :from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01")) + :to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01"))))) ) (describe "Query preambles"