aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPhilipp Stephani2020-06-10 19:01:03 +0200
committerPhilipp Stephani2020-06-14 20:01:28 +0200
commite96f78fca672c74b7bf1120b7683a50295418725 (patch)
treeaded2f5b0e00ca786bbd70093fce422a229ecfd4 /test
parent62cf8f1649468fc2f6c4f8926ab5c4bb184bfbe8 (diff)
downloademacs-e96f78fca672c74b7bf1120b7683a50295418725.tar.gz
emacs-e96f78fca672c74b7bf1120b7683a50295418725.zip
Band-aid for edebugging generator bodies (Bug#40434).
Edebug doesn't support them well. Rather than trying to fix Edebug, disable instrumentation for now to prevent annoying bugs. * lisp/emacs-lisp/generator.el (iter-defun, iter-lambda, iter-make) (iter-do): Don't attempt to instrument bodies that are mangled by the CPS transformer. * test/lisp/emacs-lisp/generator-tests.el (generator-tests-edebug): New regression test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/emacs-lisp/generator-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/generator-tests.el b/test/lisp/emacs-lisp/generator-tests.el
index bcfab201636..9b1a573ea6a 100644
--- a/test/lisp/emacs-lisp/generator-tests.el
+++ b/test/lisp/emacs-lisp/generator-tests.el
@@ -304,4 +304,13 @@ identical output."
304 (1+ it))))))) 304 (1+ it)))))))
305 -2))) 305 -2)))
306 306
307(ert-deftest generator-tests-edebug ()
308 "Check that Bug#40434 is fixed."
309 (with-temp-buffer
310 (prin1 '(iter-defun generator-tests-edebug ()
311 (iter-yield 123))
312 (current-buffer))
313 (edebug-defun))
314 (should (eql (iter-next (generator-tests-edebug)) 123)))
315
307;;; generator-tests.el ends here 316;;; generator-tests.el ends here