From 92cf211b02e75151ea4e6420afac2dec01568a16 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 5 Jul 2021 02:46:34 -0500 Subject: [PATCH] WIP: Try copying passing test from ERT file Is this related to ts.el? But how could that explain a void-variable error? --- tests/test-org-ql.el | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 8a7d59b..1029fcd 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -495,22 +495,27 @@ with keyword arg NOW in PLIST." ;; to comment out the test. But it doesn't matter much, anyway, ;; because I know it works properly. - (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 ,(make-ts :unix 1546322400.0) - :to ,(make-ts :unix 1546408799.0)) - (ts :type active - :from ,(make-ts :unix 1546322400.0) - :to ,(make-ts :unix 1546408799.0)) - (ts :type inactive - :from ,(make-ts :unix 1546322400.0) - :to ,(make-ts :unix 1546408799.0)) - (ts :type inactive - :from ,(make-ts :unix 1546322400.0) - :to ,(make-ts :unix 1546408799.0)))) + ;; (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 ,(make-ts :unix 1546322400.0) + ;; :to ,(make-ts :unix 1546408799.0)) + ;; (ts :type active + ;; :from ,(make-ts :unix 1546322400.0) + ;; :to ,(make-ts :unix 1546408799.0)) + ;; (ts :type inactive + ;; :from ,(make-ts :unix 1546322400.0) + ;; :to ,(make-ts :unix 1546408799.0)) + ;; (ts :type inactive + ;; :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")))) ) (describe "Query preambles"