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...
This commit is contained in:
Adam Porter 2021-07-05 02:50:00 -05:00
parent 92cf211b02
commit 51bd90bb03

View file

@ -512,10 +512,22 @@ with keyword arg NOW in PLIST."
;; :from ,(make-ts :unix 1546322400.0) ;; :from ,(make-ts :unix 1546322400.0)
;; :to ,(make-ts :unix 1546408799.0)))) ;; :to ,(make-ts :unix 1546408799.0))))
(expect (org-ql--normalize-query '(ts-active :on "2019-01-01")) (expect (org-ql--normalize-query '(or (ts-active :on "2019-01-01")
:to-equal `(ts :type active (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")) :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")))) :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" (describe "Query preambles"