From 7906389719bc2ed53c566837a9586bbbffea4db6 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 27 Oct 2025 00:53:22 -0500 Subject: feat:test-runner: Enhance ERT test runner with focus/unfocus support Add comprehensive documentation and workflow details for the ERT test runner, including integration with Projectile projects for automatic test discovery. Refactor code to support focus/unfocus workflows, allowing developers to efficiently manage test execution by focusing on specific test files. Introduce internal utility functions `cj/test--do-*` to modularize logic for file operations and focus management, improving code maintainability. Add new tests in `test-test-runner.el` to validate the enhanced functionality, ensuring robust handling of focus operations and test execution scenarios. --- modules/test-runner.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/test-runner.el') diff --git a/modules/test-runner.el b/modules/test-runner.el index 79e62e77..125a8d20 100644 --- a/modules/test-runner.el +++ b/modules/test-runner.el @@ -66,6 +66,11 @@ (require 'ert) (require 'cl-lib) +;;; External Variables and Functions + +(defvar cj/custom-keymap) ; Defined in init.el +(declare-function projectile-project-root "projectile" ()) + ;;; Variables (defvar cj/test-global-directory nil @@ -111,11 +116,7 @@ if not found or not in a project." (mapcar #'file-name-nondirectory (directory-files dir t "^test-.*\\.el$"))))) -<<<<<<< HEAD -(defun cj/test--do-load-files (dir files) -======= (defun cj/test--do-load-files (_dir files) ->>>>>>> 76493d5 (feat:test-runner: Enhance ERT test runner with focus/unfocus support) "Load test FILES from DIR. Returns: (cons \\='success loaded-count) on success, (cons \\='error (list failed-files errors)) on errors." -- cgit v1.2.3