branch: externals/hyperbole
commit d2d283c6f6ffb8dd6a1aa214fd9b4f6ef435672a
Author: bw <[email protected]>
Commit: bw <[email protected]>
+hsys-org--meta-return-on-end-of-line: Add back mocks to prevent err
---
ChangeLog | 3 +++
test/hsys-org-tests.el | 34 +++++++++++++++++++++-------------
2 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ac30fa3bb8..479762bb6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2025-04-13 Bob Weiner <[email protected]>
+* test/hsys-org-tests.el (hsys-org--meta-return-on-end-of-line): Add
+ mocks back in to prevent scrolling eob or bob errors.
+
* test/hmouse-drv-tests.el (hbut-man-apropos-test, hbut-info-node-test,
hbut-ib-url-with-label, hbut-mail-address-test,
hbut-pathname-test, hbut-pathname-lisp-variable-test,
diff --git a/test/hsys-org-tests.el b/test/hsys-org-tests.el
index d3ed6fd798..0e2790c01a 100644
--- a/test/hsys-org-tests.el
+++ b/test/hsys-org-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]>
;;
;; Orig-Date: 23-Apr-21 at 20:55:00
-;; Last-Mod: 13-Apr-25 at 14:50:53 by Bob Weiner
+;; Last-Mod: 13-Apr-25 at 16:20:45 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -236,18 +236,22 @@ This is independent of the setting of
`hsys-org-enable-smart-keys'."
(insert "* h1")
(goto-char 1)
(end-of-line)
- (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
- (should (action-key))
- (should (hattr:actype-is-p 'hsys-org-meta-return)))
+ (with-mock
+ (mock (hsys-org-meta-return) => t)
+ (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
+ (should (action-key))
+ (should (hattr:actype-is-p 'hsys-org-meta-return))))
;; Two lines with text and returns: smart-org triggers with nil or
:buttons setting
(with-temp-buffer
(org-mode)
(insert "* h1\n* h2\n")
(goto-char 1)
(end-of-line)
- (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
- (should (action-key))
- (should (hattr:actype-is-p 'hsys-org-meta-return)))))
+ (with-mock
+ (mock (hsys-org-meta-return) => t)
+ (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
+ (should (action-key))
+ (should (hattr:actype-is-p 'hsys-org-meta-return))))))
(let ((hsys-org-enable-smart-keys t)
(v t))
@@ -257,18 +261,22 @@ This is independent of the setting of
`hsys-org-enable-smart-keys'."
(insert "* h1")
(goto-char 1)
(end-of-line)
- (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
- (should (action-key))
- (should (hattr:actype-is-p 'smart-scroll-up)))
+ (with-mock
+ (mock (smart-scroll-up) => t)
+ (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
+ (should (action-key))
+ (should (hattr:actype-is-p 'smart-scroll-up))))
;; Two lines with text and returns: smart-eolp triggers with t setting
(with-temp-buffer
(org-mode)
(insert "* h1\n* h2\n")
(goto-char 1)
(end-of-line)
- (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
- (should (action-key))
- (should (hattr:actype-is-p 'smart-scroll-up)))))
+ (with-mock
+ (mock (smart-scroll-up) => t)
+ (should (equal hsys-org-enable-smart-keys v)) ; Ert traceability
+ (should (action-key))
+ (should (hattr:actype-is-p 'smart-scroll-up))))))
(provide 'hsys-org-tests)