Skip to content

Commit

Permalink
Merge pull request #625 from rswgnu/fix-tests-make-resulting-path-abs…
Browse files Browse the repository at this point in the history
…olute

Fix tests, make result path absolute
  • Loading branch information
rswgnu authored Dec 22, 2024
2 parents 2de6ac6 + 37b443d commit 5edb95c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/hbut-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]>
;;
;; Orig-Date: 30-may-21 at 09:33:00
;; Last-Mod: 16-Dec-24 at 00:55:21 by Bob Weiner
;; Last-Mod: 22-Dec-24 at 21:58:44 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -223,7 +223,8 @@ Create button with link-to-directory using `temporary-file-directory`."

(ert-deftest hbut-tests-ibut-program-link-to-file ()
"Programatically create ibut link to file."
(let ((test-file (make-temp-file "ibut" nil ".txt")))
(let ((test-file (make-temp-file "ibut" nil ".txt"))
(default-directory "/home/user/directory/")) ; Make link be absolute
(unwind-protect
(with-temp-buffer
(ibut:program "name" 'link-to-file test-file)
Expand All @@ -238,7 +239,8 @@ Create button with link-to-directory using `temporary-file-directory`."
(ibut:program "name" 'link-to-directory "/tmp/")
(should (string= "<[name]> - \"/tmp/\"" (buffer-string)))
(goto-char 3)
(let ((but (ibut:at-p)))
(let ((but (ibut:at-p))
(default-directory "/home/user/directory/")) ; Make link be absolute
(should but)
(with-temp-buffer
(ibut:insert-text but)
Expand Down

0 comments on commit 5edb95c

Please sign in to comment.