emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole e67d0f733f 058/143: Fix edebugging of tests t


From: ELPA Syncer
Subject: [elpa] externals/hyperbole e67d0f733f 058/143: Fix edebugging of tests that have not been previously defined
Date: Mon, 19 Feb 2024 15:58:55 -0500 (EST)

branch: externals/hyperbole
commit e67d0f733fc8a9f741ea4e5099280bbfeccd3ca5
Author: bw <rsw@gnu.org>
Commit: bw <rsw@gnu.org>

    Fix edebugging of tests that have not been previously defined
---
 ChangeLog   |  5 +++++
 hypb-ert.el | 10 ++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 311ab9df5f..2f41b2d8d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2024-01-03  Bob Weiner  <rsw@gnu.org>
 
+* hypb-ert.el (hypb-ert-run-test-at-definition): Fix to edebug function
+    when not previously defined.
+  test/hypb-ert-tests.el (hypb-ert-tests--edebug-is-called): Make edebug
+    test work.
+
 * hib-debbugs.el (declare-function): Revert declarations to use
     "ext:debbugs-gnu" from "ext:debbugs" since the newer package
     does not have many of the functions that Hyperbole presently uses.
diff --git a/hypb-ert.el b/hypb-ert.el
index ef97904198..52b7c7170d 100644
--- a/hypb-ert.el
+++ b/hypb-ert.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org> and Bob Weiner <rsw@gnu.org>
 ;;
 ;; Orig-Date:    31-Mar-21 at 21:11:00
-;; Last-Mod:      1-Jan-24 at 13:10:06 by Bob Weiner
+;; Last-Mod:      3-Jan-24 at 03:37:28 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -105,14 +105,16 @@ With optional START-END-FLAG, return a list of (test-name 
start-pos end-pos)."
   "Assume on the name in the first line of an ert test def, eval and run the 
test.
 With optional DEBUG-IT non-nil (when the assist-key is pressed), edebug the
 test when it is run."
-  (let (test-sym)
-    (setq test-sym (intern-soft test-name))
+  (let ((test-sym (intern-soft test-name)))
     ;; Ensure run the latest version of the test, either with the
     ;; edebugger if already instrumented for it; otherwise, with the
     ;; normal evaluator.
     (if (and test-sym debug-it)
        (edebug-defun)
-      (eval-defun nil))
+      (eval-defun nil)
+      (setq test-sym (intern-soft test-name))
+      (when (and test-sym debug-it)
+       (edebug-defun)))
     (setq test-sym (intern-soft test-name))
     (when (and test-sym (ert-test-boundp test-sym))
       (when (and buffer-file-name (string-prefix-p hyperb:dir 
buffer-file-name))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]