Morgan Smith <[email protected]> writes: > note: "test-org-agenda/time-grid" currently fails interactivly as the value of > `org-agenda-time-grid' depends on `(display-graphic-p)' but that's an issue > for > another day.
Fixed it! See attached. Also see previous email for 2 more patches if you haven't already. Tested on emacs 28.2, emacs 29.4, and emacs 30.2
>From 2907875cdf742706b1202125b47d4ded21288da6 Mon Sep 17 00:00:00 2001 From: Morgan Smith <[email protected]> Date: Fri, 17 Oct 2025 10:21:10 -0400 Subject: [PATCH] testing: Fix test failure on graphical frames * testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): Test against `org-agenda-time-grid' and `org-agenda-current-time-string' instead of a hardcoded string as they depend on `display-graphic-p'. --- testing/lisp/test-org-agenda.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el index 1abc53028..bbb8dd921 100644 --- a/testing/lisp/test-org-agenda.el +++ b/testing/lisp/test-org-agenda.el @@ -99,7 +99,10 @@ test-org-agenda/time-grid (set-buffer org-agenda-buffer-name) (save-excursion (goto-char (point-min)) - (should (search-forward "8:00...... now - - - - - - - - - - - - - - - - - - - - - - - - -"))) + (should (search-forward + (concat "8:00" + (nth 2 org-agenda-time-grid) + org-agenda-current-time-string)))) (save-excursion (goto-char (point-min)) (should (search-forward "agenda-file2: 9:30-10:00 Scheduled: TODO one"))) @@ -108,13 +111,17 @@ test-org-agenda/time-grid (should (search-forward "agenda-file2:10:00-12:30 Scheduled: TODO two"))) (save-excursion (goto-char (point-min)) - (should (search-forward "10:00...... ----------------"))) + (should (search-forward (concat "10:00" + (nth 2 org-agenda-time-grid) + (nth 3 org-agenda-time-grid))))) (save-excursion (goto-char (point-min)) (should (search-forward "agenda-file2:13:00-15:00 Scheduled: TODO three"))) (save-excursion (goto-char (point-min)) - (should (search-forward "agenda-file2:19:00...... Scheduled: TODO four")))) + (should (search-forward (concat "agenda-file2:19:00" + (nth 2 org-agenda-time-grid) + "Scheduled: TODO four"))))) (org-test-agenda--kill-all-agendas)) ;; Custom time grid strings (org-test-at-time "2024-01-17 8:00" -- 2.51.0
