branch: externals/hyperbole commit 409db374d1e5b5003d93af0d7078952138e59c18 Merge: 039fe682f6 0bab6487ea Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
Merge branch 'master' into rsw --- ChangeLog | 5 +++++ test/hbut-tests.el | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4ccb48d1c8..78e07d7d54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-04-14 Mats Lidell <ma...@gnu.org> + +* test/hbut-tests.el (hypb--gbut-act-with-web-link): Test for gbut:act + on a web link. + 2024-04-14 Bob Weiner <r...@gnu.org> * hyrolo.py: Add this file for command-line search for string matches in HyRolo diff --git a/test/hbut-tests.el b/test/hbut-tests.el index d5f58d8e50..2e8e5caefa 100644 --- a/test/hbut-tests.el +++ b/test/hbut-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> ;; ;; Orig-Date: 30-may-21 at 09:33:00 -;; Last-Mod: 16-Mar-24 at 23:44:27 by Mats Lidell +;; Last-Mod: 14-Apr-24 at 21:52:52 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -780,6 +780,18 @@ See #10 for the proper way to add an ibutton name. (goto-char 8) ;; ibtypes::mail-address !! (should (equal (hattr:get (ibut:at-p) 'categ) 'ibtypes::pathname)))) +(ert-deftest hypb--gbut-act-with-web-link () + "Verify `gbut:act' with a web link calls browser." + (defvar global-but-file) + (let ((global-but-file (make-temp-file "gbut" nil ".txt" + "<[Link]> - \"https://savannah.gnu.org/projects/hyperbole/\"\n"))) + (unwind-protect + (mocklet ((gbut:file => global-but-file) + ((browse-url "https://savannah.gnu.org/projects/hyperbole/") => t) + (hpath:find-noselect => (find-file-noselect global-but-file))) + (gbut:act "Link")) + (hy-delete-file-and-buffer global-but-file)))) + ;; This file can't be byte-compiled without the `el-mock' package (because of ;; the use of the `with-mock' macro), which is not a dependency of Hyperbole. ;; Local Variables: