diff --git a/testing/examples/agenda-file.org b/testing/examples/agenda-file.org index 1c7264979..b3b872574 100644 --- a/testing/examples/agenda-file.org +++ b/testing/examples/agenda-file.org @@ -4,3 +4,5 @@ * test agenda SCHEDULED: <2017-07-19 Wed> ** subnote +* test code 216bc1ff1d862e78183e38ee9a4da504919b9878 +<2019-01-08 Tue> diff --git a/testing/examples/diary-file b/testing/examples/diary-file new file mode 100644 index 000000000..11745bce1 --- /dev/null +++ b/testing/examples/diary-file @@ -0,0 +1 @@ +2019-01-08 test code: f0bcf0cd8bad93c1451bb6e1b2aaedef5cce7cbb diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el index a9cbcb8ff..bdee2bfe7 100644 --- a/testing/lisp/test-org-agenda.el +++ b/testing/lisp/test-org-agenda.el @@ -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)