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
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2026-06-09 Mats Lidell <matsl@gnu.org>

* test/hbut-tests.el (hbut-tests--ibut-at-p-identifies-a-remote-pathname):
Remove comment.

* test/hywiki-tests.el (hywiki-tests--edit-string-pairs): Uncomment
working test case.

* test/hyrolo-tests.el (hyrolo-tests--grep-or-fgrep): Use cl-letf for
mocking call-interactively. Functions with optional arguments does not
work with el-mock and native compilation. The mock is called with the
optional args set to nil causing it to see different number of
arguments depending on whether the code is natively compiled or not.

2026-06-07 Bob Weiner <rsw@gnu.org>

* hbut.el (ibut:to-text): Fix missing let of 'name-end' and assign a value.
Expand Down
4 changes: 2 additions & 2 deletions test/hbut-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: 30-may-21 at 09:33:00
;; Last-Mod: 12-Apr-26 at 15:11:31 by Bob Weiner
;; Last-Mod: 9-Jun-26 at 00:01:32 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -780,7 +780,7 @@ See #10 for the proper way to add an ibutton name.
(should (equal (hattr:get (ibut:at-p) 'categ) 'ibtypes::pathname))
(goto-char (- (point-max) 5))
(should (equal (hattr:get (ibut:at-p) 'categ) 'ibtypes::pathname))
(goto-char 8) ;; ibtypes::mail-address !!
(goto-char 8)
(should (equal (hattr:get (ibut:at-p) 'categ) 'ibtypes::pathname))))

(ert-deftest hypb--gbut-act-with-web-link ()
Expand Down
16 changes: 9 additions & 7 deletions test/hyrolo-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: 19-Jun-21 at 22:42:00
;; Last-Mod: 1-Jun-26 at 00:09:22 by Bob Weiner
;; Last-Mod: 8-Jun-26 at 23:42:26 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -2010,12 +2010,14 @@ match
(ert-deftest hyrolo-tests--grep-or-fgrep ()
"Verify `hyrolo-grep-or-fgrep' calls hyrolo grep or fgrep based on prefix arg.
Uses mocks to verify the call path."
(with-mock
(mock (call-interactively 'hyrolo-grep))
(hyrolo-grep-or-fgrep))
(with-mock
(mock (call-interactively 'hyrolo-fgrep))
(hyrolo-grep-or-fgrep '(4))))
(let ((captured-args nil))
(cl-letf (((symbol-function 'call-interactively)
(lambda (cmd &optional record-flag keys)
(setq captured-args (list cmd record-flag keys)))))
(hyrolo-grep-or-fgrep)
(should (equal (car captured-args) #'hyrolo-grep))
(hyrolo-grep-or-fgrep '(4))
(should (equal (car captured-args) #'hyrolo-fgrep)))))

(ert-deftest hyrolo-tests--kill ()
"Verify `hyrolo-kill' deletes hyrolo items and handles error cases.
Expand Down
7 changes: 2 additions & 5 deletions test/hywiki-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell
;;
;; Orig-Date: 18-May-24 at 23:59:48
;; Last-Mod: 12-Apr-26 at 15:11:29 by Bob Weiner
;; Last-Mod: 9-Jun-26 at 16:26:28 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -50,10 +50,7 @@ named WikiReferent with a non-page referent type."

(defconst hywiki-tests--edit-string-pairs
[
;; !! TODO: This test fails
;; ("\"WikiWord#section with spaces\"<backward-delete-char 1>" "\"{WikiWord#section} with spaces") ;; shrink highlight to "{WikiWord#section}

;; These tests pass
("\"WikiWord#section with spaces\"<backward-delete-char 1>" "\"{WikiWord#section} with spaces") ;; shrink highlight to "{WikiWord#section}
("Hi#a<insert-char ?b> cd" "{Hi#ab} cd")
("\"WikiWord#a b c<backward-delete-char 2>" "\"{WikiWord#a} b")
("Hi" "{Hi}")
Expand Down