diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-05-19 22:02:06 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-05-19 22:02:06 +0900 |
commit | e48372f8e5722643e37185b004469acd174663f7 (patch) | |
tree | b77ec71bb51856f98d34182eca56322750533017 /test/lisp/emacs-lisp/edebug-tests.el | |
parent | d0fa569b7303c2d893b54d0a7af7a521308a5ed4 (diff) | |
parent | 61291e06cc804de2075305c220d31ef6072f28c8 (diff) | |
download | emacs-e48372f8e5722643e37185b004469acd174663f7.tar.gz emacs-e48372f8e5722643e37185b004469acd174663f7.tar.bz2 emacs-e48372f8e5722643e37185b004469acd174663f7.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/emacs-lisp/edebug-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/edebug-tests.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index 7d45432e57e..2f45050e2eb 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -1029,14 +1029,21 @@ clashes (Bug#41853)." inner@cl-flet@10002 edebug-tests-cl-flet-2))))))) +(defmacro edebug-tests--duplicate-symbol-backtrack (arg) + "Helper macro that exemplifies Bug#42701. +ARG is either (FORM) or (FORM IGNORED)." + (declare (debug ([&or (form) (form sexp)]))) + (car arg)) + (ert-deftest edebug-tests-duplicate-symbol-backtrack () "Check that Edebug doesn't create duplicate symbols when backtracking (Bug#42701)." (with-temp-buffer - (dolist (form '((require 'subr-x) - (defun edebug-tests-duplicate-symbol-backtrack () - (if-let (x (funcall (lambda (y) 1) 2)) 3 4)))) - (print form (current-buffer))) + (print '(defun edebug-tests-duplicate-symbol-backtrack () + (edebug-tests--duplicate-symbol-backtrack + ;; Passing (FORM IGNORED) forces backtracking. + ((lambda () 123) ignored))) + (current-buffer)) (let* ((edebug-all-defs t) (edebug-initial-mode 'Go-nonstop) (instrumented-names ()) |