mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
test-org-agenda: Test for scheduled-looking lines
* testing/examples/agenda-file.org: Add test headings where SCHEDULED line is not planning. * testing/lisp/test-org-agenda.el (test-org-agenda/non-scheduled-re-matces): Make sure that SCHEDULED lines that do no belong to planning do not trigger agenda matches. See https://list.orgmode.org/20220101200103.GB29829@itccanarias.org/T/#t
This commit is contained in:
parent
e8d6db540b
commit
65f9524136
@ -6,3 +6,13 @@ SCHEDULED: <2017-07-19 Wed>
|
||||
** subnote
|
||||
* test code 216bc1ff1d862e78183e38ee9a4da504919b9878
|
||||
<2019-01-08 Tue>
|
||||
* test agenda non-scheduled
|
||||
#+begin_src org
|
||||
SCHEDULED: <2022-01-03 Mon>
|
||||
#+end_src
|
||||
* colon scheduled entry
|
||||
: SCHEDULED: <2022-01-03 Mon>
|
||||
* begin_example scheduled entry
|
||||
#+begin_example
|
||||
SCHEDULED: <2022-01-03 Mon>
|
||||
#+end_example
|
||||
|
@ -92,6 +92,20 @@
|
||||
(looking-at " *agenda-file:Scheduled: *test agenda"))))
|
||||
(org-test-agenda--kill-all-agendas))
|
||||
|
||||
(ert-deftest test-org-agenda/non-scheduled-re-matces ()
|
||||
"Make sure that scheduled-looking elements do not appear in agenda.
|
||||
See https://list.orgmode.org/20220101200103.GB29829@itccanarias.org/T/#t."
|
||||
(cl-assert (not org-agenda-sticky) nil "precondition violation")
|
||||
(cl-assert (not (org-test-agenda--agenda-buffers))
|
||||
nil "precondition violation")
|
||||
(let ((org-agenda-span 'day)
|
||||
(org-agenda-files `(,(expand-file-name "examples/agenda-file.org"
|
||||
org-test-dir))))
|
||||
(org-agenda-list nil "<2022-01-03 Mon>")
|
||||
(set-buffer org-agenda-buffer-name)
|
||||
(should (= 2 (count-lines (point-min) (point-max)))))
|
||||
(org-test-agenda--kill-all-agendas))
|
||||
|
||||
(ert-deftest test-org-agenda/set-priority ()
|
||||
"One informative line in the agenda. Check that org-agenda-priority updates the agenda."
|
||||
(cl-assert (not org-agenda-sticky) nil "precondition violation")
|
||||
|
Loading…
Reference in New Issue
Block a user