mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
uncomment test
This commit is contained in:
parent
713f6f32e1
commit
e883a559ca
1 changed files with 17 additions and 17 deletions
34
test/fixtures/execution/test_expressions.coffee
vendored
34
test/fixtures/execution/test_expressions.coffee
vendored
|
@ -1,9 +1,9 @@
|
|||
# Ensure that we don't wrap Nodes that are "statement_only" in a closure.
|
||||
|
||||
# items: [1, 2, 3, "bacon", 4, 5]
|
||||
#
|
||||
# for item in items
|
||||
# break if item is "bacon"
|
||||
items: [1, 2, 3, "bacon", 4, 5]
|
||||
|
||||
for item in items
|
||||
break if item is "bacon"
|
||||
|
||||
findit: (items) ->
|
||||
for item in items
|
||||
|
@ -15,16 +15,16 @@ puts findit(items) is "bacon"
|
|||
# When when a closure wrapper is generated for expression conversion, make sure
|
||||
# that references to "this" within the wrapper are safely converted as well.
|
||||
|
||||
# obj: {
|
||||
# num: 5
|
||||
# func: ->
|
||||
# this.result: if false
|
||||
# 10
|
||||
# else
|
||||
# "a"
|
||||
# "b"
|
||||
# this.num
|
||||
# }
|
||||
#
|
||||
# puts obj.num is obj.func()
|
||||
# puts obj.num is obj.result
|
||||
obj: {
|
||||
num: 5
|
||||
func: ->
|
||||
this.result: if false
|
||||
10
|
||||
else
|
||||
"a"
|
||||
"b"
|
||||
this.num
|
||||
}
|
||||
|
||||
puts obj.num is obj.func()
|
||||
puts obj.num is obj.result
|
Loading…
Reference in a new issue