diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-02-26 12:33:35 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-02-26 12:33:35 -0500 |
commit | 25cfccfb8b5bced05d5547f3eabb4d0508a575c8 (patch) | |
tree | 10f76a64a474f05a4e867bb0d1280cc9e53e1d8e /test/lisp/emacs-lisp/edebug-tests.el | |
parent | 76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7 (diff) | |
download | emacs-25cfccfb8b5bced05d5547f3eabb4d0508a575c8.tar.gz emacs-25cfccfb8b5bced05d5547f3eabb4d0508a575c8.tar.bz2 emacs-25cfccfb8b5bced05d5547f3eabb4d0508a575c8.zip |
(edebug-tests-trivial-comma): Avoid interaction (bug#69406)
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-trivial-backquote):
Don't use obsolete `edebug-eval-defun`.
(edebug-tests-trivial-comma): Use `inhibit-read-only`; don't use
obsolete `edebug-eval-defun`; and fix bug#69406 by binding
`eval-expression-debug-on-error`.
Diffstat (limited to 'test/lisp/emacs-lisp/edebug-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/edebug-tests.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index 8c0f729dc39..29adbcff947 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -860,8 +860,7 @@ test and possibly others should be updated." (let ((inhibit-read-only t)) (delete-region (point-min) (point-max)) (insert "`1")) - (with-suppressed-warnings ((obsolete edebug-eval-defun)) - (edebug-eval-defun nil)) + (eval-defun nil) ;; `eval-defun' outputs its message to the echo area in a rather ;; funny way, so the "1" and the " (#o1, #x1, ?\C-a)" end up placed ;; there in separate pieces (via `print' rather than via `message'). @@ -871,18 +870,21 @@ test and possibly others should be updated." (setq edebug-initial-mode 'go) ;; In Bug#23651 Edebug would hang reading `1. - (with-suppressed-warnings ((obsolete edebug-eval-defun)) - (edebug-eval-defun t)))) + (eval-defun t) + (should (string-match-p (regexp-quote " (#o1, #x1, ?\\C-a)") + edebug-tests-messages)))) (ert-deftest edebug-tests-trivial-comma () "Edebug can read a trivial comma expression (Bug#23651)." (edebug-tests-with-normal-env - (read-only-mode -1) - (delete-region (point-min) (point-max)) - (insert ",1") - (read-only-mode) - (with-suppressed-warnings ((obsolete edebug-eval-defun)) - (should-error (edebug-eval-defun t))))) + (let ((inhibit-read-only t)) + (delete-region (point-min) (point-max)) + (insert ",1")) + ;; FIXME: This currently signals a "Source has changed" error, which is + ;; itself a bug (the source hasn't changed). All we're testing here + ;; is that the Edebug gets past the step of reading the sexp. + (should-error (let ((eval-expression-debug-on-error nil)) + (eval-defun t))))) (ert-deftest edebug-tests-circular-read-syntax () "Edebug can instrument code using circular read object syntax (Bug#23660)." |