branch: externals/hyperbole commit ef93d6a124c9275f3b6afb4e9cd725d458095df2 Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
Fix tests to move off delim chars that trigger hui-select now --- ChangeLog | 5 +++++ test/demo-tests.el | 15 ++++++++------- test/hmouse-drv-tests.el | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b72742011..02f89582f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2025-05-19 Bob Weiner <r...@gnu.org> +* test/demo-tests.el (fast-demo-elisp-or-env-vars): Fix to move past opening + brace so does not trigger hui-select. + (demo-smart-mouse-keys-ref-test, demo-man-apropos-test): Make similar fixes. + test/hmouse-drv-tests.el (hbut-rfc-test): Make similar fixes. + * hypb.el (hypb:in-string-p): Fix open quote detection heuristics including subtracting quoted delimiters from overall counts. diff --git a/test/demo-tests.el b/test/demo-tests.el index 6d58fe16fc..3366971c05 100644 --- a/test/demo-tests.el +++ b/test/demo-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> ;; ;; Orig-Date: 30-Jan-21 at 12:00:00 -;; Last-Mod: 20-Apr-25 at 14:55:17 by Bob Weiner +;; Last-Mod: 19-May-25 at 22:53:23 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -42,7 +42,8 @@ (let ((enable-local-variables nil)) (hypb:display-file-with-logo "DEMO") (goto-char (point-min)) - (re-search-forward "#Smart Keys") + ;; Omit last char of string from search so ends on a non-quote char + (re-search-forward "#Smart Key") (action-key) (should (bolp)) (should (looking-at "^\\* Smart"))) @@ -387,11 +388,11 @@ (hy-test-helpers:kill-buffer "DEMO") (hy-test-helpers:kill-buffer "*Occur*")))) -;; Man appropos -(ert-deftest demo-man-appropos-test () +;; Man apropos +(ert-deftest demo-man-apropos-test () (with-temp-buffer (insert "rm (1) - remove") - (goto-char 4) + (goto-char 2) (with-mock (mock (man "rm(1)") => t) (action-key)))) @@ -450,10 +451,10 @@ (unwind-protect (with-temp-buffer (insert "\"${hyperb:dir}/HY-NEWS\"") - (goto-char 3) + (goto-char 4) (action-key) (should (string= (buffer-name (current-buffer)) "HY-NEWS"))) - (hy-test-helpers:kill-buffer "HY-NEWS"))) + (hy-test-helpers:kill-buffer "HY-NEWS"))) (ert-deftest fast-demo-elisp-library-in-load-path () "Verify ibut to Elisp library works." diff --git a/test/hmouse-drv-tests.el b/test/hmouse-drv-tests.el index 87728289cd..444bfb8938 100644 --- a/test/hmouse-drv-tests.el +++ b/test/hmouse-drv-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> ;; ;; Orig-Date: 28-Feb-21 at 22:52:00 -;; Last-Mod: 17-May-25 at 16:07:56 by Mats Lidell +;; Last-Mod: 19-May-25 at 22:53:55 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -528,7 +528,7 @@ (ert-deftest hbut-man-apropos-test () (with-temp-buffer (insert "rm (1) - remove") - (goto-char 4) + (goto-char 2) (with-mock (mock (man "rm(1)") => t) (should (action-key))