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
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2025-10-18 Mats Lidell <[email protected]>

* test/hywiki-tests.el (hywiki-tests--edit): Added cleanup of
hywiki-directory after test.
(hywiki-tests--only-file-in-dir-p)
(hywiki-tests--delete-hywiki-cache)
(hywiki-tests--delete-hywiki-dir-and-buffer): Add safer delete of
hywiki-directory so removal of a live hywiki-directory is less
likely. The dir must be empty and cache is only removed if it is the
last file remaining in the dir. Moved these into hywiki-tests since
they are only used with managing hywiki-directory in test cleanup and
use it through out the hywiki-directory tests.

2025-10-16 Mats Lidell <[email protected]>

* test/hywiki-tests.el (hywiki-tests--consult-grep)
Expand Down
11 changes: 2 additions & 9 deletions test/hy-test-helpers.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-Jan-21 at 12:00:00
;; Last-Mod: 5-Oct-25 at 23:56:44 by Mats Lidell
;; Last-Mod: 18-Oct-25 at 00:31:06 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -110,16 +110,9 @@ Checks ACTYPE, ARGS, LOC, LBL-KEY and NAME."

(defun hy-delete-dir-and-buffer (dir)
"Delete DIR and buffer visiting directory."
(let ((buf (find-buffer-visiting dir))
(hywiki-cache (when (featurep 'hywiki)
(expand-file-name hywiki-cache-default-file
dir))))
(let ((buf (find-buffer-visiting dir)))
(when buf
(kill-buffer buf))
(when (and hywiki-cache
(file-readable-p hywiki-cache)
(file-writable-p hywiki-cache))
(delete-file hywiki-cache))
(delete-directory dir)))

(defun hy-make-random-wikiword (&optional length word-length)
Expand Down
Loading