mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
; Add test for iter-lambda variable shadowing (Bug#26073)
* test/lisp/emacs-lisp/generator-tests.el (iter-lambda-variable-shadowing): New test.
This commit is contained in:
parent
298275c595
commit
82379efaaf
1 changed files with 10 additions and 0 deletions
|
|
@ -292,3 +292,13 @@ identical output.
|
|||
(i 0)
|
||||
(j (setq i (1+ i))))
|
||||
(iter-yield i))))))))
|
||||
|
||||
(ert-deftest iter-lambda-variable-shadowing ()
|
||||
"`iter-lambda' forms which have local variable shadowing (Bug#26073)."
|
||||
(should (equal (iter-next
|
||||
(funcall (iter-lambda ()
|
||||
(let ((it 1))
|
||||
(iter-yield (funcall
|
||||
(lambda (it) (- it))
|
||||
(1+ it)))))))
|
||||
-2)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue