test-org-agenda: Test diary inclusion

* testing/lisp/test-org-agenda.el (test-org-agenda/diary-inclusion):
  New test.
This commit is contained in:
Marco Wahl 2019-01-08 21:32:44 +01:00
parent 8a5d8f79a1
commit c006a60fac
3 changed files with 21 additions and 0 deletions

View File

@ -4,3 +4,5 @@
* test agenda
SCHEDULED: <2017-07-19 Wed>
** subnote
* test code 216bc1ff1d862e78183e38ee9a4da504919b9878
<2019-01-08 Tue>

View File

@ -0,0 +1 @@
2019-01-08 test code: f0bcf0cd8bad93c1451bb6e1b2aaedef5cce7cbb

View File

@ -161,6 +161,24 @@
(should (= 11 text-scale-mode-amount)))
(org-test-agenda--kill-all-agendas)))
(ert-deftest test-org-agenda/diary-inclusion ()
"Diary inclusion happens."
(org-test-agenda--kill-all-agendas)
(let ((diary-file (expand-file-name "examples/diary-file" org-test-dir))
(org-agenda-files `(,(expand-file-name "examples/agenda-file.org"
org-test-dir)))
(diary-date-forms '((month "[-/]" day "[^-/0-9]")
(year "[-/]" month "[-/]" day "[^0-9]")
(monthname " *" day "[^-0-9]")
(year " *" monthname " *" day "[^0-9]")
(dayname "\\W")))
(org-agenda-span 'day)
(org-agenda-include-diary t))
(org-agenda-list nil "<2019-01-08>")
(should (search-forward "f0bcf0cd8bad93c1451bb6e1b2aaedef5cce7cbb" nil t))
(org-test-agenda--kill-all-agendas)))
(provide 'test-org-agenda)