summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/generator-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/emacs-lisp/generator-tests.el')
-rw-r--r--test/lisp/emacs-lisp/generator-tests.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/generator-tests.el b/test/lisp/emacs-lisp/generator-tests.el
index 0d325f1485a..9b1a573ea6a 100644
--- a/test/lisp/emacs-lisp/generator-tests.el
+++ b/test/lisp/emacs-lisp/generator-tests.el
@@ -26,6 +26,8 @@
(require 'ert)
(require 'cl-lib)
+;;; Code:
+
(defun generator-list-subrs ()
(cl-loop for x being the symbols
when (and (fboundp x)
@@ -38,8 +40,7 @@
`cps-testcase' defines an ERT testcase called NAME that evaluates
BODY twice: once using ordinary `eval' and once using
lambda-generators. The test ensures that the two forms produce
-identical output.
-"
+identical output."
`(progn
(ert-deftest ,name ()
(should
@@ -302,3 +303,14 @@ identical output.
(lambda (it) (- it))
(1+ it)))))))
-2)))
+
+(ert-deftest generator-tests-edebug ()
+ "Check that Bug#40434 is fixed."
+ (with-temp-buffer
+ (prin1 '(iter-defun generator-tests-edebug ()
+ (iter-yield 123))
+ (current-buffer))
+ (edebug-defun))
+ (should (eql (iter-next (generator-tests-edebug)) 123)))
+
+;;; generator-tests.el ends here