Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
(kotl-mode--add-after-parent, kotl-mode--add-before-parent)
(kotl-mode--add-below-parent, kotl-mode--add-child): Add tests.

* test/hsys-org-tests.el (hsys-org:org-link-at-p): Update test.

2025-07-27 Bob Weiner <rsw@gnu.org>

* hpath.el (hpath:external-file-suffixes): Remove old Sun Raster image format
Expand Down
24 changes: 21 additions & 3 deletions test/hsys-org-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 23-Apr-21 at 20:55:00
;; Last-Mod: 11-Jun-25 at 00:20:08 by Mats Lidell
;; Last-Mod: 31-Jul-25 at 17:32:10 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -66,10 +66,28 @@
(ert-deftest hsys-org:org-link-at-p ()
"Should be t if point is within an org-link."
(with-temp-buffer
;; Org-mode
(org-mode)
(insert "[[Link]]\n")
(insert "[[Link]]\n\n")
(ert-info ("Within an org link")
(goto-char 3)
(should (hsys-org-link-at-p)))
(ert-info ("At end of line")
(end-of-line)
(should-not (hsys-org-link-at-p)))
(ert-info ("At end of buffer")
(end-of-buffer)
(should-not (hsys-org-link-at-p)))
;; Out side of org-mode
(erase-buffer)
(fundamental-mode)
(insert "[[hy:HyWiki]]\n\n")
(goto-char 3)
(should (hsys-org-link-at-p))))
(ert-info ("Accept link if unknown HyWiki button")
(should (hsys-org-link-at-p)))
(ert-info ("Ignore link if known HyWiki button")
(mocklet (((hywiki-word-at) => t))
(should-not (hsys-org-link-at-p))))))

(ert-deftest hsys-org:org-target-at-p ()
"Should be non nil if point is within an org-radio-target."
Expand Down