[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: ert-run-test-at-point
From: |
Mariano Montone |
Subject: |
Re: Proposal: ert-run-test-at-point |
Date: |
Fri, 9 Sep 2022 12:08:31 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
El 9/9/22 a las 12:04, Mariano Montone escribió:
Hello,
I have this in my .emacs, for quickly running the ert test at cursor
point:
;; run ert test at point
...
(defun ert-run-test-at-point ()
"Run the ert test at point."
(interactive)
(let* ((test-form (read-from-string (defun-at-point)))
(test-name (cadar test-form)))
(ert test-name)))
Perhaps calling eval-defun it gets even better:
(defun ert-run-test-at-point ()
"Run the ert test at point."
(interactive)
(eval-defun nil)
(let* ((test-form (read-from-string (defun-at-point)))
(test-name (cadar test-form)))
(ert test-name)))