branch: externals-release/org commit 0b269852104bf472d2a7e93f88ab5b2e5dc9a39c Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
testing/lisp/test-org.el: Do not assume that `post-command-hook' has no buffer-local value * testing/lisp/test-org.el (test-org/auto-repeat-maybe): (test-org/org-log-done): (test-org/org-todo-prefix): Account that note processing is using global value of `post-command-hook'. When buffer-local value is set, we canno just test "automatic" `post-command-hook' value. --- testing/lisp/test-org.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 2487c9ace6..4896193212 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -8783,7 +8783,7 @@ SCHEDULED: <2021-06-16 " (1+ (not space)) " +1d> "* TODO Read book SCHEDULED: <2021-06-15 Tue +1d>" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string)))))) @@ -8798,7 +8798,7 @@ SCHEDULED: <2021-06-15 Tue +1d>" (org-test-with-temp-text "* TODO task" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) ;; `time' value. @@ -8816,7 +8816,7 @@ CLOSED: %s" (org-test-with-temp-text "* TODO task" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) (should @@ -8833,7 +8833,7 @@ CLOSED: %s" (org-test-with-temp-text "* TODO task" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) ;; TODO: Test `note' value. @@ -8849,7 +8849,7 @@ CLOSED: %s" <point>* TODO task" (org-set-regexps-and-options) (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) (should @@ -8869,7 +8869,7 @@ CLOSED: %s" <point>* TODO task" (org-set-regexps-and-options) (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) ;; Test local property overrides. @@ -8887,7 +8887,7 @@ CLOSED: %s" :LOGGING: nil :END:" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string))))) (should @@ -8910,7 +8910,7 @@ CLOSED: %s :LOGGING: logdone :END:" (org-todo "DONE") - (when (memq 'org-add-log-note post-command-hook) + (when (memq 'org-add-log-note (default-value 'post-command-hook)) (org-add-log-note)) (buffer-string)))))) @@ -8943,7 +8943,7 @@ CLOSED: %s (progn (org-todo '(4)) (should (string-match-p "DONE" (buffer-string))) - (should (member #'org-add-log-note post-command-hook)) + (should (member #'org-add-log-note (default-value 'post-command-hook))) (if (eq org-inhibit-logging 'note) (should (eq org-log-note-how 'time)) (should (eq org-log-note-how 'note))))