Skip to content

Commit 5edb95c

Browse files
authored
Merge pull request #625 from rswgnu/fix-tests-make-resulting-path-absolute
Fix tests, make result path absolute
2 parents 2de6ac6 + 37b443d commit 5edb95c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/hbut-tests.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Mats Lidell <[email protected]>
44
;;
55
;; Orig-Date: 30-may-21 at 09:33:00
6-
;; Last-Mod: 16-Dec-24 at 00:55:21 by Bob Weiner
6+
;; Last-Mod: 22-Dec-24 at 21:58:44 by Mats Lidell
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -223,7 +223,8 @@ Create button with link-to-directory using `temporary-file-directory`."
223223

224224
(ert-deftest hbut-tests-ibut-program-link-to-file ()
225225
"Programatically create ibut link to file."
226-
(let ((test-file (make-temp-file "ibut" nil ".txt")))
226+
(let ((test-file (make-temp-file "ibut" nil ".txt"))
227+
(default-directory "/home/user/directory/")) ; Make link be absolute
227228
(unwind-protect
228229
(with-temp-buffer
229230
(ibut:program "name" 'link-to-file test-file)
@@ -238,7 +239,8 @@ Create button with link-to-directory using `temporary-file-directory`."
238239
(ibut:program "name" 'link-to-directory "/tmp/")
239240
(should (string= "<[name]> - \"/tmp/\"" (buffer-string)))
240241
(goto-char 3)
241-
(let ((but (ibut:at-p)))
242+
(let ((but (ibut:at-p))
243+
(default-directory "/home/user/directory/")) ; Make link be absolute
242244
(should but)
243245
(with-temp-buffer
244246
(ibut:insert-text but)

0 commit comments

Comments
 (0)