projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
298275c
)
; Add test for iter-lambda variable shadowing (Bug#26073)
author
Noam Postavsky
<npostavs@gmail.com>
Thu, 15 Feb 2018 02:31:06 +0000
(21:31 -0500)
committer
Noam Postavsky
<npostavs@gmail.com>
Thu, 15 Feb 2018 02:31:06 +0000
(21:31 -0500)
* test/lisp/emacs-lisp/generator-tests.el
(iter-lambda-variable-shadowing): New test.
test/lisp/emacs-lisp/generator-tests.el
patch
|
blob
|
history
diff --git
a/test/lisp/emacs-lisp/generator-tests.el
b/test/lisp/emacs-lisp/generator-tests.el
index 9bf8413e1598562ba0e66d72b2f3c4b2469bb244..bca3efa550b1a2843c2bb5ca5aa7f82130c2d26f 100644
(file)
--- a/
test/lisp/emacs-lisp/generator-tests.el
+++ b/
test/lisp/emacs-lisp/generator-tests.el
@@
-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)))