1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Adding a test for #2273

This commit is contained in:
Jeremy Ashkenas 2012-04-24 15:39:22 -04:00
parent afdcdcfd54
commit e433098eb2

View file

@ -244,6 +244,13 @@ test "Optimized range comprehensions.", ->
exxes = ('x' for [0...10]) exxes = ('x' for [0...10])
ok exxes.join(' ') is 'x x x x x x x x x x' ok exxes.join(' ') is 'x x x x x x x x x x'
test "Loop variables should be able to reference outer variables", ->
outer = 1
do ->
null for outer in [1, 2, 3]
eq outer, 3
test "Lenient on pure statements not trying to reach out of the closure", -> test "Lenient on pure statements not trying to reach out of the closure", ->