org-clock: Fix failing tests

* lisp/org-clock.el (org-clocktable-steps): Fix type of START and END
  bindings.
This commit is contained in:
Nicolas Goaziou 2018-11-27 00:18:28 +01:00
parent 19a75de480
commit 655c08dcc8

View file

@ -2706,21 +2706,17 @@ a number of clock tables."
;; timestamp string. The `:block' property has precedence ;; timestamp string. The `:block' property has precedence
;; over `:tstart' and `:tend'. ;; over `:tstart' and `:tend'.
(start (start
(apply #'encode-time (pcase (if range (car range) (plist-get params :tstart))
(pcase (if range (car range) (plist-get params :tstart)) ((and (pred numberp) n)
((and (pred numberp) n) (pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n)))
(pcase-let (apply #'encode-time (list 0 0 org-extend-today-until d m y))))
((`(,m ,d ,y) (calendar-gregorian-from-absolute n))) (timestamp (seconds-to-time (org-matcher-time timestamp)))))
(list 0 0 org-extend-today-until d m y)))
(timestamp (org-matcher-time timestamp)))))
(end (end
(apply #'encode-time (pcase (if range (nth 1 range) (plist-get params :tend))
(pcase (if range (nth 1 range) (plist-get params :tend)) ((and (pred numberp) n)
((and (pred numberp) n) (pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n)))
(pcase-let (apply #'encode-time (list 0 0 org-extend-today-until d m y))))
((`(,m ,d ,y) (calendar-gregorian-from-absolute n))) (timestamp (seconds-to-time (org-matcher-time timestamp))))))
(list 0 0 org-extend-today-until d m y)))
(timestamp (org-matcher-time timestamp))))))
(while (time-less-p start end) (while (time-less-p start end)
(unless (bolp) (insert "\n")) (unless (bolp) (insert "\n"))
;; Insert header before each clock table. ;; Insert header before each clock table.