Skip to content

Commit d121eb2

Browse files
author
Joerg Bornemann
committed
Fix dumb-jump-goto-file-line-test for Emacs 29 (jacktasia#442)
In Emacs 29, the ring-insert function is not called anymore when dumb-jump-goto-file-line is called. The corresponding test relied on an implementation detail of xref-push-marker-stack. See the longer explanation in jacktasia#442. Fix the test by guarding the check for the ring-insert call with a Emacs version check.
1 parent 7b77187 commit d121eb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/dumb-jump-test.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@
348348
(ert-deftest dumb-jump-goto-file-line-test ()
349349
(let ((js-file (f-join test-data-dir-proj1 "src" "js" "fake.js")))
350350
(with-mock
351-
(mock (ring-insert * *))
351+
(when (version< emacs-version "29")
352+
(mock (ring-insert * *)))
352353
(dumb-jump-goto-file-line js-file 3 0)
353354
(should (string= (buffer-file-name) js-file))
354355
(should (= (line-number-at-pos) 3)))))

0 commit comments

Comments
 (0)